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.