android phonegap安装命令提示符- Error: EPERM, errno: 50



我是这个PhoneGap应用程序开发的新手,当我试图使用install (http://phonegap.com/install/)指南从命令提示符安装PhoneGap时,这说我更多的错误像

npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ENOGIT
npm ERR! Error: EPERM, open 'C:npm-debug.log'
npm ERR!  { [Error: EPERM, open 'C:npm-debug.log'] errno: 50, code: 'EPERM', pa
th: 'C:\npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js " "install" "-g" "phonegap"
npm ERR! cwd C:
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path C:npm-debug.log
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, open 'C:npm-debug.log' npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:npm-debug.log
npm ERR! not ok code 0

我在哪里安装Git,但为什么会出现这个错误?还有其他方法可以安装和使用phonegap吗?

按以下步骤操作:

  • 下载并安装Node.js安装完成后,您应该能够在命令行上调用node和npm。
  • 下载并安装一个git客户端,如果你还没有的话。安装完成后,您应该能够在命令行上调用git。使用Node.js的npm实用工具安装cordova模块。cordova模块会被npm工具自动下载。

OS X和Linux: $ sudo npm install -g cordova

Windows: C:>npm install -g cordova

来源:PhoneGap Docs

最新更新