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:
wget https://getcomposer.org/download/1.6.3/composer.phar
mv composer.phar composer
chmod +x composer
./composer
mv composer /usr/bin/
for Ubuntu 18
mv composer /usr/local/bin/