【问题标题】:Phonegap installation issue (shasum check failed) [duplicate]Phonegap安装问题(shasum检查失败)[重复]
【发布时间】:2014-01-14 05:31:26
【问题描述】:

我正在尝试在 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 无法在这里为我提供可靠的答案。

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

【问题讨论】:

  • @animuson 看不出这是 21 小时前提出的问题的重复,当时这个问题在将近 3 个月前被问到(这不应该是重复的吗?),但是谢谢无论如何都给我指出答案。

标签: node.js cordova


【解决方案1】:

奇怪的是,这个问题的解决方案没有出现在任何搜索引擎上。无论如何,根据 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。我已经尝试过了,它对我有用。

【讨论】:

【解决方案2】:

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

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

【讨论】:

  • 在 Windows 上也为我工作
猜你喜欢
  • 1970-01-01
  • 2014-01-04
  • 2013-12-01
  • 2014-01-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-03-14
  • 1970-01-01
相关资源
最近更新 更多