Composer installed, but get /usr/bin/env: php: No such file or directory : <p>On CentOS 7, I installed PHP 7.1.</p>

<p>Then I installed composer with: </p>

<pre><code>cd /tmp
curl -sS https://getcomposer.org/installer | php71     --&gt; used php71 instead of php, php didn't work
mv composer.phar /usr/local/bin/composer
</code></pre>

<p>Then, when using <code>composer</code>, I get:</p>

<pre><code>/usr/bin/env: php: No such file or directory
</code></pre>

<p>When using <code>sudo composer</code>, I get:</p>

<pre><code>sudo: composer: command not found
</code></pre>
