繁体   English   中英

“shasum check failed”安装Phonegap时出错

[英]“shasum check failed” Error while installing Phonegap

使用以下方法在我的Mac OS机器上安装PhoneGap时遇到问题:

sudo npm install -g phonegap

错误信息:

npm ERR! Error: shasum check failed for /Users/MYUSER/tmp/npm-33966-l4NZ7A8D/1387281663617-0.9133979633916169/tmp.tgz
npm ERR! Expected: dee5a33ff04d7217194dc1ad1342e3a441761942
npm ERR! Actual:   ab7d89ca1f31db14db047d01222dd968649cfb50
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:120:20)
npm ERR!     at _stream_readable.js:896:16
npm ERR!     at process._tickCallback (node.js:599:11)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/isaacs/npm/issues>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "phonegap"
npm ERR! cwd /Users/HummusawY
npm ERR! node -v v0.11.10-pre
npm ERR! npm -v 1.3.17
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/MYUSER/npm-debug.log
npm ERR! not ok code 0

试试这个:

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

然后

sudo npm install -g phonegap

我的校验和问题是由https://registry.npmjs.org/npm/-/npm-1.3.19.tgz引起的。

先试试这个

“npm set registry https://registry.npmjs.org/

如果失败,那么尝试使用npm镜像:

“npm set registry http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com

然后正常使用它:

npm安装快递

您可以将Node.js降级到版本0.10.19以解决此问题

尝试:npm install https://registry.npmjs.org/npm/-/npm-1.3.21.tgz

从“19”变为21

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM