Symfony logo

Update Symfony Installer to latest version in Ubuntu Linux

So here I was trying to create symfony 5 project but somehow as things weren’t working as per documentation. I ran command ‘symfony check:requirements’ to see if my system fulfills all requirements for latest version of symfony, but this is what i received:

$symfony check:requirements

There are no commands defined in the "check" namespace. 

I was on version 1.5.11 of symfony binary, which apparently was the latest but when i ran help command here’s what i got:


 Symfony Installer (1.5.11)

 This is the official installer to start new projects based on the
 Symfony full-stack framework.

 To create a new project called blog in the current directory using
 the latest stable version of Symfony, execute the following command:

   symfony new blog

 Create a project based on the Symfony Long Term Support version (LTS):

   symfony new blog lts

 Create a project based on a specific Symfony branch:

   symfony new blog 2.8 or symfony new blog 3.0

 Create a project based on a specific Symfony version:

   symfony new blog 2.8.1 or symfony new blog 3.0.1

 Create a demo application to learn how a Symfony application works:

   symfony demo

 Updating the Symfony Installer

 New versions of the Symfony Installer are released regularly. To update your
 installer version, execute the following command:

   symfony self-update

So I see this installer doesn’t support Symfony 5. Also becuase symfony self-update didn’t work and simply said:

$ symfony self-update
// Symfony Installer is already updated to the latest version (1.5.11).

Well It seems I was out of options, So I thought why not try to reinstall symfony installer, so I installed latest installer from symfony.

$ wget -O - | bash
--2020-03-28 15:03:11--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4962 (4.8K) [binary/octet-stream]
Saving to: ‘STDOUT’

-                                           100%[===========================================================================================>]   4.85K  --.-KB/s    in 0s      

2020-03-28 15:03:11 (40.7 MB/s) - written to stdout [4962/4962]

Symfony CLI installer

Environment check
  [*] cURL is installed
  [*] Gzip is installed
  [*] Git is installed
  [*] You architecture (amd64) is supported

  Finding the latest version (platform: "linux_amd64")...
  Downloading version 4.13.3 (
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   613  100   613    0     0   1228      0 --:--:-- --:--:-- --:--:--  1226
100 7343k  100 7343k    0     0  1177k      0  0:00:06  0:00:06 --:--:-- 1558k
  Uncompress binary...
  Making the binary executable...
  Installing the binary into your home directory...
  The binary was saved to: /home/mayank/.symfony/bin/symfony

The Symfony CLI v4.13.3 was installed successfully!

Add this to your shell configuration file:
  export PATH="$HOME/.symfony/bin:$PATH"
Start a new shell, and then run 'symfony'

Or install it globally on your system:
  mv /home/mayank/.symfony/bin/symfony /usr/local/bin/symfony
and then run 'symfony'

mv /home/mayank/.symfony/bin/symfony /usr/local/bin/symfony
mv: replace '/usr/local/bin/symfony', overriding mode 0755 (rwxr-xr-x)? 

So the final step was to replace original symfony with the new one in bin directory which now makes it available for me.

Symfony CLI version v4.13.3 (c) 2017-2020 Symfony SAS
Symfony CLI helps developers manage projects, from local code to remote infrastructure

These are common commands used in various situations:

Work on a project locally

  new                                                            Create a new Symfony project
  serve                                                          Run a local web server
  server:stop                                                    Stop the local web server
  security:check                                                 Check security issues in project dependencies
  composer                                                       Runs Composer without memory limit
  console                                                        Runs the Symfony Console (bin/console) for current project
  php, pecl, pear, php-fpm, php-cgi, php-config, phpdbg, phpize  Runs the named binary using the configured PHP version

Manage a project on Cloud

  login        Log in with your SymfonyConnect account
  init         Initialize a new project using templates
  link         Link current git repository to a SymfonyCloud project
  projects     List active projects
  envs         List environments
  env:create   Create an environment
  tunnel:open  Open SSH tunnels to the app's services
  ssh          Open an SSH connection to the app container
  deploy       Deploy an environment
  domains      List domains
  vars         List variables
  user:add     Add a user to the project

Show all commands with symfony help,
Get help for a specific command with symfony help COMMAND.

Hope you find this helpful.

Leave a Comment

Your email address will not be published. Required fields are marked *