Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony 3.0 installation

Tags:

php

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

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

like image 677
Sarang Avatar asked Dec 01 '15 06:12

Sarang


1 Answers

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
like image 136
Matteo Avatar answered Oct 01 '22 12:10

Matteo