On CentOS 7, I installed PHP 7.1.
Then I installed composer with:
cd /tmp
curl -sS https://getcomposer.org/installer | php71 --> used php71 instead of php, php didn't work
mv composer.phar /usr/local/bin/composer
Then, when using composer
, I get:
/usr/bin/env: php: No such file or directory
When using sudo composer
, I get:
sudo: composer: command not found
As @alexhowansky suggested in a comment, I ran the following command:
sudo ln -s /usr/bin/php71 /usr/bin/php
Now the composer command works.