User Tools

Site Tools


ubuntu:install_node.js:install_from_source

Ubuntu - Install node.js - Install from Source

Install packages required to compile the source code

sudo apt install build-essential

Download the latest source code from nodejs.org

wget http://nodejs.org/dist/v0.10.9/node-v0.10.9.tar.gz

Extract the tar archive

tar zxvf node-v0.10.9.tar.gz

Enter the directory we just extracted from the tar archive

cd node-v0.10.9

Compile and install

./configure
make
make install

Test

Test node.js to make sure it’s working correctly.

echo "console.log('Hello World');" | node

This should simply print “Hello World” in the console.

If you don’t get any errors, node.js is installed and functional and you may just have executed your first node.js script.

ubuntu/install_node.js/install_from_source.txt · Last modified: 2021/01/25 10:41 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki