hidayat3676's avatar

/usr/local/bin/composer.phar: No such file or directory error on mac

i just install composer and set it's path through the following commond

echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc

when i open the directory below usr/local/bin i can see composer but when i type composer it's give me error this

"/usr/local/bin/composer.phar: No such file or directory" 

when i write php composer.phr it's again give me error

"Could not open input file: composer.phr".

hope some one have solve this error to help me out of this problem i'm stuck in it for few hours but didn't found any solution.

0 likes
4 replies
bobbybouwmann's avatar

What happens when you type which composer? It should show you where the binary is installed ;)

1 like
Tray2's avatar

Did you move the composer.phar with this command?

sudo mv composer.par /usr/local/bin/composer

If that is done you don't need to add it to the path and it should be called with just composer.

You might need to make it executable with this command sudo chmod +x /usr/local/bin/composer

Please or to participate in this conversation.