Symfony 3.0安装 [英] Symfony 3.0 installation
问题描述
是symfony的新手,从上个月开始,在终端上的ubuntu上使用以下命令连续安装新的symfony项目
Am new to symfony and from last month am continuously installing new symfony project using following command on ubuntu from the terminal
# Linux, Mac OS X
$ symfony new my_project_name
直到今天,它一直运行良好,但不只是检查了新版本,而是现在开始出现以下错误
and it was working perfectly until today, but than just checked the new version release, but now it started giving me following error
Downloading Symfony...
4.93 MB/4.93 MB ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
Preparing project...
PHP Warning: require(/var/www/projectname/app/SymfonyRequirements.php): failed to open stream: No such file or directory in phar:///usr/local/bin/symfony/src/Symfony/Installer/DownloadCommand.php on line 265
PHP Stack trace:
PHP 1. {main}() /usr/local/bin/symfony:0
PHP 2. require() /usr/local/bin/symfony:10
PHP 3. Symfony\Component\Console\Application->run() phar:///usr/local/bin/symfony/symfony:35
PHP 4. Symfony\Component\Console\Application->doRun() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:126
PHP 5. Symfony\Component\Console\Application->doRunCommand() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:195
PHP 6. Symfony\Component\Console\Command\Command->run() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:878
PHP 7. Symfony\Installer\NewCommand->execute() phar:///usr/local/bin/symfony/vendor/symfony/console/Command/Command.php:259
PHP 8. Symfony\Installer\DownloadCommand->checkSymfonyRequirements() phar:///usr/local/bin/symfony/src/Symfony/Installer/NewCommand.php:65
PHP Fatal error: require(): Failed opening required '/var/www/projectname/app/SymfonyRequirements.php' (include_path='.:/usr/share/php:/usr/share/pear') in phar:///usr/local/bin/symfony/src/Symfony/Installer/DownloadCommand.php on line 265
PHP Stack trace:
PHP 1. {main}() /usr/local/bin/symfony:0
PHP 2. require() /usr/local/bin/symfony:10
PHP 3. Symfony\Component\Console\Application->run() phar:///usr/local/bin/symfony/symfony:35
PHP 4. Symfony\Component\Console\Application->doRun() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:126
PHP 5. Symfony\Component\Console\Application->doRunCommand() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:195
PHP 6. Symfony\Component\Console\Command\Command->run() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:878
PHP 7. Symfony\Installer\NewCommand->execute() phar:///usr/local/bin/symfony/vendor/symfony/console/Command/Command.php:259
PHP 8. Symfony\Installer\DownloadCommand->checkSymfonyRequirements() phar:///usr/local/bin/symfony/src/Symfony/Installer/NewCommand.php:65
我什至在usr/local/bin/symfony位置检查了symfony,它就在那里.
I have even check the symfony at location usr/local/bin/symfony and it was there.
推荐答案
这是一个已解决的问题,您需要指定要安装的版本.如此处和
It is a resolved issue that you need to specify the version you want to install. As described here and here, you need to:
-
更新您的安装程序
Update your installer
>symfony self-update
或使用sudo,具体取决于您的安装方式:
or with sudo, depending on how you install it:
>sudo symfony self-update
指定版本:
Specify the version:
>symfony new my_project_name 3.0
希望这会有所帮助.
更新
有了Symfony安装程序上错误的正确解决方案,现在3.0是默认版本.在其他情况下,您可以指定完整的版本(包括次要和主要),如下所示:
With the correct resolutions of the bug on the Symfony installer, now the 3.0 is the default version. In other case, you can specify the complete version (with minor and major) as follows:
>symfony new my_project_name 3.0.0
这篇关于Symfony 3.0安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!