Ubuntu / Install NodeJS & npm

Just execute this commands!

Installing Node.js via package-manager:

sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

Check version:

$ npm -v
1.4.9
$ node -v
v0.10.28

For more info visit this guide.


Sounds like you have one of the nodejs PPAs installed. One I use has npm distributed as part of the nodejs package and it's impossible and unneccessary to install both.

Install nodejs and see if you can run npm.