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.

2 Answers 2


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
  • thanx for the usefull tips.
    – Lupus
    May 21, 2013 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, 2014 at 5:48
  • 1
    sudo update-alternatives --config node resolved the error.
    – bukzor
    Apr 2, 2014 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.

  • 1
    I removed the files and solved which files exactly? Can you explain it in bit detail for future reference. Thank you! May 8, 2013 at 9:32
  • @BasharatSial detail added
    – Lupus
    May 8, 2013 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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