I am installing latest version of nodejs in my localhost. But system is always installing the 4.2.6 version.How can i install the latest version.
Commands i have use
Hey guys if you have Ubuntu 16 try this instructions. It worked for me perfectly.Also provide your account password whenever asked in this process.
sudo su -c "echo 'deb https://deb.nodesource.com/node_8.x xenial main' >> /etc/apt/sources.list.d/nodesource.list"
sudo su -c "echo 'deb-src https://deb.nodesource.com/node_8.x xenial main' >> /etc/apt/sources.list.d/nodesource.list"
sudo apt-get update
apt-cache policy nodejs Check if the versions listed has node 8
sudo apt-get install nodejs
nodejs -v check the node version installed
This shall successfully install nodejs version 8 on your system. If you wish any other version, then change the version on step 1 and 2 it shall work successfully.