OSX -bash: composer: command not found

前端 未结 10 1010
我寻月下人不归
我寻月下人不归 2020-12-22 18:52

If i type \"composer\" i get the above error message.

I did on my macbook:

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /us         


        
10条回答
  •  春和景丽
    2020-12-22 19:29

    Globally install Composer on OS X 10.11 El Capitan

    This command will NOT work in OS X 10.11:

    curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer 
    

    Instead, let's write to the /usr/local/bin path for the user:

    curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
    

    Now we can access the composer command globally, just like before.

提交回复
热议问题