I have installed node.js in my machine (linux mint 15), when I run
The program 'node' can be found in the following packages:
Try: sudo apt-get install <selected package>
The package node is not related to node.js.
nodejs is what you want, however it is arguably better to have the command be called node for compatibility with scripts that use
You can either just create a symlink in your path:
sudo ln -s `which nodejs` /usr/local/bin/node
Or you could install nvm and then use it to install the latest version of node.js:
nvm install stable
I prefer the nvm method, as it allows you to
sudo apt-get remove nodejs, and then manage which version of node you're using yourself. You can also have multiple versions of node.js installed and use
nvm use to easily switch between them.
I also like to add a line to the bottom my
nvm use stable > /dev/null. That will automatically use the latest version you have installed.
To update your node version to the latest stable:
nvm install stable. Every time you do this you will need to install any npm packages that you had installed globally if you want to continue using them.
To switch to an old version just run
nvm use <version>, or, if you don't have the old version installed already:
nvm install <version>.