close

[Solved] Composer installed, but get /usr/bin/env: php: No such file or directory

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Composer installed, but get /usr/bin/env: php: No such file or directory in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Composer installed, but get /usr/bin/env: php: No such file or directory Error Occurs?

Today I get the following error Composer installed, but get /usr/bin/env: php: No such file or directory in php.

How To Solve Composer installed, but get /usr/bin/env: php: No such file or directory Error ?

  1. How To Solve Composer installed, but get /usr/bin/env: php: No such file or directory Error ?

    To Solve Composer installed, but get /usr/bin/env: php: No such file or directory Error You need to install the cli package.
    yum install php71u-cli is what I needed to do for IUS php.

  2. Composer installed, but get /usr/bin/env: php: No such file or directory

    To Solve Composer installed, but get /usr/bin/env: php: No such file or directory Error You need to install the cli package.
    yum install php71u-cli is what I needed to do for IUS php.

Solution 1

You need to install the cli package.

yum install php71u-cli is what I needed to do for IUS php.

Solution 2

As @alexhowansky suggested, I ran the following command:

sudo ln -s /usr/bin/php71 /usr/bin/php

Now the composer command works. Thanks

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment