'Symfony: command not found
I am trying working with symfony since past couple of months. Last night I did an auto remove to purge not needed repositories. After that I have not been able to create a new symfony project using the symfony command. When I run Symfony new SecurityDemo 2.8.1 in the terminal,
I get the error
Symfony: command not found
I tried installing the Symfony Installer again as directed in the documentation http://symfony.com/doc/current/setup.html. I went to my root directory and followed the installation procedure as shown in the screenshot

Still I get the same error.
All help is appreciated.
EDIT:
I am working with LAMP and am using PHP 5.6.
When I try to update the symfony Installer using symfony self-update I get the output
// Symfony Installer is already updated to the latest version (1.5.8).
Solution 1:[1]
Add the following line to your shell configuration file:
export PATH="$HOME/.symfony/bin:$PATH"
Solution 2:[2]
For me the fix was to reinstall symfony:
curl -sS https://get.symfony.com/cli/installer | bash
see here https://symfony.com/download
as far as I experienced, it does not tamper with the environment.
Solution 3:[3]
Try call Symfony it in lowercase as example:
>symfony new SecurityDemo 2.8.1
Hope this help
Solution 4:[4]
I had the same problem. The right command would be:
php symfony new SecurityDemo 2.8.1
Not sure why it would not work without the word php even though the documentation does not prescribe it.
Solution 5:[5]
cd your-project/
composer require symfony/web-server-bundle --dev
php bin/console server:start
Working beautifully for me on Fedora 33 Workstation
base: https://symfony.com/doc/4.0/setup/built_in_web_server.html
Solution 6:[6]
Turns out that I cannot use capital 'S' in symfony. using symfony new project_name did the trick.
Solution 7:[7]
The Right Command is
symfony new SecurityDemo 2.8.1
Solution 8:[8]
If you can’t use the Symfony installer for any reason, you can create Symfony applications with Composer, the dependency manager used by modern PHP applications.
composer create-project symfony/framework-standard-edition SecurityDemo "2.8.1"
make sure you've already install composer.
Solution 9:[9]
try this
composer require symfony/flex
composer install
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
