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 used:
sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install nodejs
After installing i have checked:
node -v
Result:
v4.2.6
Output of apt-cache policy nodejs:
Installed: 4.2.6~dfsg-1ubuntu4
Candidate: 4.2.6~dfsg-1ubuntu4
Version table:
*** 4.2.6~dfsg-1ubuntu4 500
500 http://archive.ubuntu.com/ubuntu xenial/universe amd64
Packages
100 /var/lib/dpkg/status
OR
Can anyone send the installation steps for installing from
node-v8.2.1-linux-x64.tar.xz
file.
Thanks