Ubuntu 15.10 npm 安装 phonegap 时出错

Ubuntu 15.10 npm 安装 phonegap 时出错

我升级到 15.10 并安装了 Nodejs v5.8.0 和 npm 3.7.3,然后:

在终端上:

sudo npm install -g phonegap

输出:

npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
/usr/lib
└── (empty)

npm ERR! Linux 4.2.0-30-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "phonegap"
npm ERR! node v5.8.0
npm ERR! npm  v3.7.3
npm ERR! path /usr/lib/node_modules/.staging/async-14a43b5b
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename '/usr/lib/node_modules/.staging/async-14a43b5b' -> '/usr/lib/node_modules/phonegap/node_modules/localtunnel/node_modules/request/node_modules/form-data/node_modules/async'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/lib/node_modules/.staging/async-14a43b5b' -> '/usr/lib/node_modules/phonegap/node_modules/localtunnel/node_modules/request/node_modules/form-data/node_modules/async'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/frandmg/npm-debug.log
npm ERR! code 1

我对 Ionic 和 cordova 没有问题,但我需要 phonegap 来开发 android 开发者应用程序。

有什么帮助吗?

提前致谢。

PS:日志文件在这里:https://justpaste.it/sbhw

答案1

我不知道发生了什么,但我已修复:

sudo npm remove -g phonegap

npm cache clean

sudo npm install -g phonegap@latest

相关内容