Install Node.js From Source with APT package manager
suggest changePrerequisites
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 Node.js 6.10.2, an old LTS release. Current Node source needs Python 3, not the python package above.
cd ~
wget https://nodejs.org/dist/v6.10.2/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
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents