简体   繁体   中英

can't install latest version of node.js

i tried a lot to install latest version of nodejs and i followed instruction in their website here Installing Node.js via package manager

i have ubuntu 16.04LTS operating system. when i try this command

nodejs -v

to check version i installed.i expected it will be 9.9.0 but i found it is v4.2.6 i also tried this command sudo apt-get install nodejs-legacy but the result still the same. so how can i install the latest version of nodejs

thanks for all of you

When you want to install from apt-get, you found in repo and you will install the latest version in repo. I think that install nvm is the best option:

https://github.com/creationix/nvm

you can easily change the node version =)

You can find good tutorial on godady site . Install latest version by using a PPA and just replace '9' by '7' in add repository like below command

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -

then go forwards to update apt-get and install nodejs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM