Mac OS Terminal:无法在全球环境中获得作曲家 [英] Mac OS Terminal: Can't get composer on the global environment
问题描述
所以我一直在尝试设置MAMP和Laravel,但一直无法使作曲家正常工作.
So I have been trying to setup my MAMP and Laravel but stuck at getting the composer to work.
我已经安装了MAMP,并且使用了以下命令:
I have installed MAMP, and I use the command:
curl -sS https://getcomposer.org/installer |php
我尝试跑步
php composer.phar
到目前为止一切正常.
然后,当我尝试将composer放到我的全局路径中时(假设下面的代码行了)
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
我收到此错误
mv:将composer.phar重命名为/usr/local/bin/composer:没有这样的文件或目录
我尝试了 mv composer.phar/usr/local/bin
,它也给出了相同的错误.
I tried mv composer.phar /usr/local/bin
as well it gives the same error.
这是我的 echo $ PATH
:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
是否有解决此问题的指针?哦,Mac Rookie在这里.
Any pointers on resolving this? Oh, Mac Rookie here.
推荐答案
确保/usr/local/bin
存在.这就是目标目录不存在时出现的错误.
Make sure that /usr/local/bin
exists. That's the error that you get when the target directory doesn't exist.
这篇关于Mac OS Terminal:无法在全球环境中获得作曲家的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!