Phonegap的安装问题(shasum检查失败)

我试图在Ubuntu 13.04(Raring Ringtail)上安装phonegap。 它运行良好的一大堆包,然后突然停止…这是最后几行的输出…

npm http GET https://registry.npmjs.org/async/-/async-0.1.22.tgz npm http 200 https://registry.npmjs.org/async/-/async-0.1.22.tgz npm http GET https://registry.npmjs.org/graceful-fs npm http 200 https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.1.tgz npm http 200 https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.1.tgz npm ERR! Error: shasum check failed for /home/thomas/tmp/npm-28537- 2GGcJK29/1380571519720-0.5711500460747629/tmp.tgz npm ERR! Expected: 4bf7f005fe1038c4fe9207603b961c97bd0ba5a3 npm ERR! Actual: b237f063a8d2d81a648e08b7173f9b1e040cc77f npm ERR! at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8 npm ERR! at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7) npm ERR! at ReadStream.EventEmitter.emit (events.js:125:20) npm ERR! at _stream_readable.js:896:16 npm ERR! at process._tickCallback (node.js:316:11) npm ERR! If you need help, you may report this log at: npm ERR! <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm ERR! <npm-@googlegroups.com> npm ERR! System Linux 3.8.0-31-generic npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "phonegap" npm ERR! cwd /home/thomas/node npm ERR! node -v v0.11.8-pre npm ERR! npm -v 1.3.11 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/thomas/node/npm-debug.log npm ERR! not ok code 0 

这个校验和是在找什么? 为什么它应该是它所说的,为什么它会不同呢? Google在这里一直没能给我提供一个可靠的答案。

我不知道我能做些什么来解决这个问题 – 有什么想法? 谢谢!

奇怪的是,这个问题的解决scheme并没有出现在任何search引擎上。 无论如何,根据关于Github上NPM问题的这个问题 ,你所要做的就是安装npm-1.3.19.tgz,如下所示:

 npm install https://registry.npmjs.org/npm/-/npm-1.3.19.tgz 

然后以通常的方式安装PhoneGap / Cordova。 我试过了,它对我有用。

更新:

安装任何失败的软件包,如下所示:

 npm install [the URL right before the shasum check fails] 

然后以通常的方式安装PhoneGap / Cordova。 我试过了,它对我有用。

我有同样的问题。 (在Mac OSX v10.8.5上)

由于重复执行了四次或五次相同的命令,我成功地安装了。