Node.js Installing Node.js Install Node.js From Source with APT package manager


Example

Prerequisites

sudo apt-get install build-essential
sudo apt-get install python

[optional]
sudo apt-get install git

Get source and build

cd ~
git clone https://github.com/nodejs/node.git

OR For the latest LTS Node.js version 6.10.2

cd ~
wget https://nodejs.org/dist/v6.3.0/node-v6.10.2.tar.gz
tar -xzvf node-v6.10.2.tar.gz

Change to the source directory such as in cd ~/node-v6.10.2

./configure
make
sudo make install