node.jsinstallationubuntu-16.04ubuntu-server

How to install Node.Js via Source Code in Ubuntu 16.04 Server?


Some of yours facing issue with installing the latest version of NodeJs on Ubuntu 16.04 Server?


Solution

  • There is no "installation" per se, you just need to extract the tarball, and make sure the node and npm binaries in the ./bin subdirectory are somewhere in your path.

    I find nvm is useful for managing node installations (it will download, extract, and add to path for you). If you want to do things manually, you can do something like:

    wget https://nodejs.org/download/release/v10.5.0/node-v10.5.0-linux-x64.tar.gz
    
    tar -xvf node-v6.9.2-linux-x64.tar.gz --directory /usr/local --strip-components 1
    

    This will put the ./bin directory in /usr/local/bin, which should be in your $PATH already. You can verify that it worked with:

    node --version
    
    npm --version
    

    Hope it helps.