How to update Composer on Linux Mint 18.3

When you install Composer (the dependency manager for PHP) globally on Linux Mint 18.3 with the package manager…

$ sudo apt install composer
$ composer -V
Composer version @package_branch_alias_version@ (1.0.0-beta2) 2016-03-27 16:00:34

…you’ll get the totally outdated version 1.0.0-beta2. The problem is that this version does not support extracting compressed package files ‘tar.gz’. It also does not support updating itself with:

$ composer selfupdate

So, you need to download the latest composer version (currently 1.6.2) manually and then put it into the directory /usr/local/bin/composer (which overrides /usr/bin/composer)

$ sudo mv composer.phar /usr/local/bin/composer
$ chmod +x /usr/local/bin/composer

now login – logout to apply the changes, voila:

$ composer -V
Composer version 1.6.2 2018-01-05 15:28:41

One thought on “How to update Composer on Linux Mint 18.3

  1. Pingback: How to install ExifTool with Composer – Articles

Leave a Reply

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