-bash:phonegap:未找到命令(Mac OS) [英] -bash: phonegap: command not found (Mac OS)
本文介绍了-bash:phonegap:未找到命令(Mac OS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<$ c> 我刚刚在Macbook(Mac OS X Mountain Lion)上使用npm安装了phonegap和cordova。 $ c> sudo npm install -g cordova
sudo npm install -g phonegap
和cordova似乎安装好,但当我尝试:
myMac:〜user $ cordova
myMac:〜user $ phonegap
我收到以下讯息:
-bash:cordova:command not found
-bash:phonegap:command not found
这两个都安装了,为什么命令不工作。
解决方案
一个老问题,但我认为我的回答将是有帮助的。
我有同样的问题,并通过创建一个符号链接解决:
cd / usr / local / bin /
sudo ln -s /usr/local/Cellar/node/6.0.0/bin/phonegap phonegap
sudo ln -s /usr/local/Cellar/node/6.0.0/bin/cordova cordova
请务必将此路径 /usr/local/Cellar/node/6.0.0/bin/ 更改为您的安装文件夹。
[] s
I just installed phonegap and cordova using npm on my Macbook (Mac OS X Mountain Lion) using these commands on the command line.
sudo npm install -g cordova
sudo npm install -g phonegap
Both Phonegap and cordova seemed to install fine, but when I tried:
myMac:~ user$ cordova
myMac:~ user$ phonegap
I got the messages:
-bash: cordova: command not found
-bash: phonegap: command not found
both were installed, why does the command not work.
解决方案
I know that this is an old question, but I think that my answer will be helpful.
I got the same problem and solve by creating a symlink:
cd /usr/local/bin/
sudo ln -s /usr/local/Cellar/node/6.0.0/bin/phonegap phonegap
sudo ln -s /usr/local/Cellar/node/6.0.0/bin/cordova cordova
Remember to change this path /usr/local/Cellar/node/6.0.0/bin/ to yours installation folder.
[]s
这篇关于-bash:phonegap:未找到命令(Mac OS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文