微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

node.js – Phonegap安装问题(shasum检查失败)

参见英文答案 > “shasum check failed” Error while installing Phonegap                                    4个
我正在尝试在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

它正在寻找什么是校验和?为什么它应该是它所说的,为什么它会有所不同?谷歌无法在这里为我提供可靠的答案.

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

解决方法

奇怪的是,这个问题的解决方案并没有出现在任何搜索引擎上.无论如何,根据Github上关于NPM问题的 this issue,您需要做的就是安装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.我试过了,它对我有用.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐