I think it's a version problem, you just have to uninstall the old version of composer, then do a new installation of its new version.
apt remove composer
and follow the steps:
- download the composer from its official release site by making use of the following command.
wget https://getcomposer.org/download/1.6.3/composer.phar
- Before you proceed with the installation, you should rename before you install and make it an executable file.
mv composer.phar composer
chmod +x composer
- Now install the package by making use the following command.
./composer
- The composer has been successfully installed now, make it access globally using the following command.
for Ubuntu 16
mv composer /usr/bin/
for Ubuntu 18
mv composer /usr/local/bin/