Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
363 views
in Technique[技术] by (71.8m points)

php - Symfony 3.0 installation

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. SymfonyComponentConsoleApplication->run() phar:///usr/local/bin/symfony/symfony:35
PHP   4. SymfonyComponentConsoleApplication->doRun() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:126
PHP   5. SymfonyComponentConsoleApplication->doRunCommand() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:195
PHP   6. SymfonyComponentConsoleCommandCommand->run() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:878
PHP   7. SymfonyInstallerNewCommand->execute() phar:///usr/local/bin/symfony/vendor/symfony/console/Command/Command.php:259
PHP   8. SymfonyInstallerDownloadCommand->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. SymfonyComponentConsoleApplication->run() phar:///usr/local/bin/symfony/symfony:35
PHP   4. SymfonyComponentConsoleApplication->doRun() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:126
PHP   5. SymfonyComponentConsoleApplication->doRunCommand() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:195
PHP   6. SymfonyComponentConsoleCommandCommand->run() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:878
PHP   7. SymfonyInstallerNewCommand->execute() phar:///usr/local/bin/symfony/vendor/symfony/console/Command/Command.php:259
PHP   8. SymfonyInstallerDownloadCommand->checkSymfonyRequirements() phar:///usr/local/bin/symfony/src/Symfony/Installer/NewCommand.php:65

I have even check the symfony at location usr/local/bin/symfony and it was there.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It is a resolved issue that you need to specify the version you want to install. As described here and here, you need to:

  1. Update your installer

    >symfony self-update
    

    or with sudo, depending on how you install it:

    >sudo symfony self-update
    
  2. Specify the version:

    >symfony new my_project_name 3.0
    

Hope this helps.

UPDATE

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...