Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The error is:

Error: npm doesn't work with node v0.5.11-pre Required: node@>=0.6

But I'v just updated my node. That is confusing.

I'v made some digging and it seems that I've installed node two times

node version is v0.5.11-pre (node -v)


my nodejs version is v0.10.5 (nodejs -v)

When I check the usr/bin there is a link named 'node' and there is a application named 'nodejs'. The link points to /etc/alternatives/node link and this link points back to usr/bin/nodejs application.

I 'whereis' to the nodejs and node. These are output:

whereis node: 
/usr/bin/node /usr/bin/X11/node /usr/local/bin/node /usr/local/lib/node /usr/share/man/man1/node.1.gz

whereis nodejs:

/usr/bin/nodejs /usr/lib/nodejs /usr/bin/X11/nodejs /usr/include/nodejs /usr/share/nodejs /usr/share/man/man1/nodejs.1.gz


I've also tried apt-get remove node and apt-get remove nodejs

Intrestingly when I tried node command it still works.

share|improve this question
up vote 3 down vote accepted

Changing update-alternatives like the following might help:

$ sudo update-alternatives --install /usr/bin/node nodejs /usr/bin/nodejs 100

$ node -v

Maybe delete all alternatives to node before:

$ sudo update-alternatives --remove-all nodejs
share|improve this answer
thanx for the usefull tips. – Lupus May 21 '13 at 10:52
I get an error: "update-alternatives: error: alternative link /usr/bin/node is already managed by node". I've ensured the "node" package (something entirely unrelated to do with modems) is uninstalled and purged, and nodejs is installed. – bukzor Apr 2 '14 at 5:48
sudo update-alternatives --config node resolved the error. – bukzor Apr 2 '14 at 5:51

It seem that I'v installed an old version (v0.5.11-pre) as well to my local/bin.

When I try to remove the node with apt-get remove command it removes the latest install version that installed via apt-get (v0.10)

I removed the folders




This solved the conflict.

share|improve this answer
I removed the files and solved which files exactly? Can you explain it in bit detail for future reference. Thank you! – Basharat Sialvi May 8 '13 at 9:32
@BasharatSial detail added – Lupus May 8 '13 at 10:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.