How to install a specific version of nodejs?

Work with ubuntu. Usually put nodejs like this:
apt-get install nodejs
Is 0.10.xx the version of the node. What to write in this team that would establish, for example, 0.12.0 version?
July 8th 19 at 12:05
3 answers
July 8th 19 at 12:07
Solution
# updated
sudo apt-get update
# set the desired packages
sudo apt-get install build-essential libssl-dev
# put nvm
curl -o - https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
source ~/.profile
# see the list of available versions of node
nvm ls-remote
# set the desired
nvm install <version></version>
All set, finally gave this string Now using node v0.12.15 (npm v2.15.1)

But if you prescribe nodejs -v gives the same old version 0.10.25
Tried to write nvm use..., run, reboot the server. But still, nodejs -v = 0.10.25

What's wrong? :C - kiley_Gottli commented on July 8th 19 at 12:10
:
nvm install 6.2.1
nvm current
#v6.2.1
- Kameron_Hilpert34 commented on July 8th 19 at 12:13
: nvm --help # all described in detail )) - Kameron_Hilpert34 commented on July 8th 19 at 12:16
: yeah, nvm 6.2.1 current shows, but why nodejs -v remains 0.10.25? Or is it meant to be? - kiley_Gottli commented on July 8th 19 at 12:19
: and node-v shows? - Kameron_Hilpert34 commented on July 8th 19 at 12:22
you can remove it completely node.js with all modules (including global) - https://www.google.ru/webhp?sourceid=chrome-instan..., then install NVM and install node.js need version through it. - dannie.Stehr commented on July 8th 19 at 12:25
: thanks for the advice. And, indeed, there were 2 nodes, and the scripts can be run both on node and nodejs team. - kiley_Gottli commented on July 8th 19 at 12:28
great, did the update to the answer Alexey, check the "answer" and then the user will immediately see his advice and mine. Thus, the answer will be more complete. - dannie.Stehr commented on July 8th 19 at 12:31
July 8th 19 at 12:09
Solution
Update to answer: if you put NVM once is node.js - you may not be the desired result.
So you can remove it completely node.js with all modules (including global) - https://www.google.ru/webhp?sourceid=chrome-instan..., then install NVM and install node.js need version through it.
July 8th 19 at 12:11

Find more questions by tags UbuntuNode.js