How to install latest LTS Node in ubuntu 16.04?

2019-08-27 16:40发布

问题:

I downloaded source code(.tar file) file from here

How i install node by tar file in my system?

回答1:

Solved

we can use this command to extract .tar file and install node in our system

  1. In terminal go into directory where you download the tar file
  2. Run command tar -xf node-v8.12.0-linux-x64.tar.xz --directory /usr/local --strip-components 1

And

We can download direct with this command

wget https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.gz
tar -xf node-v8.12.0-linux-x64.tar.gz --directory /usr/local --strip-components 1

Check is node installed

node -v
npm -v

Note: If you getting permission issue then use sudo before command.



标签: node.js npm