OSX -bash: composer: command not found

前端 未结 10 962
我寻月下人不归
我寻月下人不归 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:08

    The path /usr/local/bin/composer is not in your PATH, executables in that folder won't be found.

    Delete the folder /usr/local/bin/composer, then run

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

    This moves composer.phar into /usr/local/bin/ and renames it into composer (which is still an executable, not a folder).

    Then just use it like:

    $ composer ...
    

提交回复
热议问题