When I use whereis node
it returns the paths node: /usr/local/bin/node /opt/node/bin/node
$ node -v
v6.2.2
How should I install node v5.11.1 in Ubuntu 15.10?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityyou can use n module to help you achieve change,upgrade and remove node versions. Start by installing the n package
$ sudo npm install -g n
after that you can install many version of node as you like and activate only one of the using the cmd :
$ n v5.11.1
this will either activate the v5.11.1 version if you already install it , or if it doesn't find it it will install and activate it to be the current version that you will work with
You can use Nvm to change back to the older Node version. Nvm is a node version manager that allows you to easily switch the Node version. You can install new versions to try and easily rollback if you want
You can install Nvm easily with a curl and bash one-liner as described in the documentation. It's also available on Homebrew.
To list all the installed versions, run nvm ls
.
To change the version, run use 5.11.1
To set the system-wide default node version, run nvm alias default 5.11.1