0

I get the following error when I try to install the nodejs mongodb driver:

(precise)me@localhost:~$ sudo npm install mongodb
npm http GET https://registry.npmjs.org/mongodb

npm ERR! Error: failed to fetch from registry: mongodb
npm ERR!     at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR!     at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR!     at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR!     at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR!     at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at HTTPParser.onIncoming (http.js:1261:11)
npm ERR!     at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR!     <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR!     reportbug --attach /home/me/npm-debug.log npm
npm ERR! 
npm ERR! System Linux 3.8.11
npm ERR! command "node" "/usr/bin/npm" "install" "mongodb"
npm ERR! cwd /home/me
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: mongodb
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/me/npm-debug.log
npm not ok
(precise)me@localhost:~$

I am running ubuntu 12.04 on a chromebook (via crouton) with a 32 bit processor.

3
  • Does the log add anything? Urm, you are using a MASSIVELY old version of Node.JS! Jun 17, 2015 at 20:11
  • node 0.6.12 so yea pretty old. I guess apt-get is not up to date for node.
    – gloo
    Jun 19, 2015 at 2:40
  • I've added an answer on how to upgrade Node the "right" way for Ubuntu. Jun 19, 2015 at 15:40

1 Answer 1

1

As your installation of Node.JS is a long way out of date, you should start by updating to at least Node v0.10.x

The recommended approach for Ubuntu 12 uses the NodeSource PPA that is an extension of Chris Lea's PPA.

Upgrading Node.JS will also upgrade NPM. When you've done that, retry the MongoDB install. I'm currently running that library on a number of different platforms and it works fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .