Phonegap安装问题(shasum检查失败) [英] Phonegap installation issue (shasum check failed)

查看:200
本文介绍了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!错误:shasum检查失败/ home / thomas / tmp / npm-28537-
2GGcJK29 / 1380571519720-0.5711500460747629 / tmp.tgz
npm错误!预期:4bf7f005fe1038c4fe9207603b961c97bd0ba5a3
npm错误!实际:b237f063a8d2d81a648e08b7173f9b1e040cc77f
npm错误!在/usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!在ReadStream。< anonymous>
(/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!在ReadStream.EventEmitter.emit(events.js:125:20)
npm错误! at _stream_readable.js:896:16
npm ERR!在process._tickCallback(node.js:316:11)
npm错误!如果您需要帮助,您可以报告此日志:
npm ERR! < http://github.com/isaacs/npm/issues>
npm ERR!或电子邮件:
npm ERR! < npm-@googlegroups.com>
npm ERR!系统Linux 3.8.0-31-通用
npm错误!命令/ usr / local / bin / node/ usr / local / bin / npminstall-gphonegap
npm ERR! cwd / home / thomas / node
npm ERR! node -v v0.11.8-pre
npm ERR! npm -v 1.3.11
npm错误!
npm ERR!可以在以下位置找到其他日志记录详细信息:
npm ERR! /home/thomas/node/npm-debug.log
npm ERR! not ok code 0

这个校验和是什么?为什么它应该是它的说法,为什么会不同? Google无法在这里为我提供一个坚实的答案。



我不知道我可以做什么来解决这个问题 - 任何想法?感谢!

解决方案

很奇怪,这个问题的解决方案不会出现在任何搜索引擎上。无论如何,根据此问题在GitHub上的NPM问题,你需要做的是安装npm-1.3.19.tgz如下所示,首先:

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

然后以通常的方式安装PhoneGap / Cordova。



安装失败的程序包,如下所示:

  npm install [shasum检查失败之前的URL] 

然后以通常的方式安装PhoneGap / Cordova。我试过它,它为我工作。


I'm trying to install phonegap on Ubuntu 13.04 (Raring Ringtail). It runs fine for a whole lot of packages and then all of a sudden stops... Here is the output of the last couple of lines...

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

What is this checksum it's looking for? Why is it supposed to be what it says and why would it be different? Google hasn't been able to provide me with a solid answer here.

I have no idea what I can do to fix this - any ideas? Thanks!

解决方案

Strangely the solution to this issue doesn't appear on any search engine. Anyway, according to this issue on NPM issue on Github, all you need to do is to install npm-1.3.19.tgz as shown below, first:

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

Then installing PhoneGap/Cordova the usual way. I've tried it and it's working for me.

UPDATE:

Install whatever package that failed, as shown below:

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

Then installing PhoneGap/Cordova the usual way. I've tried it and it's working for me.

这篇关于Phonegap安装问题(shasum检查失败)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆