Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap installation issue (shasum check failed) [duplicate]

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!     <[email protected]>
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!

like image 780
iLikeBreakfast Avatar asked Sep 30 '13 20:09

iLikeBreakfast


2 Answers

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.

like image 159
Shady M. Najib Avatar answered Oct 12 '22 22:10

Shady M. Najib


I had the same problem. (on Mac OSX v10.8.5)

As a result of having executed four or five times of same commands repeatedly, I succeeded in installation.

like image 28
Mamoru Sugihara Avatar answered Oct 12 '22 20:10

Mamoru Sugihara