Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac OS Terminal: Can't get composer on the global environment [closed]

So I have been trying to setup my MAMP and Laravel but stuck at getting the composer to work.

I have installed MAMP, and I use the command:

curl -sS https://getcomposer.org/installer | php

and I tried running

php composer.phar

everything works so far.

Then when I tried to put composer into my global path (I assume the following line does it)

mv composer.phar /usr/local/bin/composer

I receive this error

mv: rename composer.phar to /usr/local/bin/composer: No such file or directory

I tried mv composer.phar /usr/local/bin as well it gives the same error.

Here is my echo $PATH: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

Any pointers on resolving this? Oh, Mac Rookie here.

like image 755
JofryHS Avatar asked Oct 25 '25 14:10

JofryHS


1 Answers

Make sure that /usr/local/bin exists. That's the error that you get when the target directory doesn't exist.

like image 154
Edward Dale Avatar answered Oct 27 '25 03:10

Edward Dale