User Tools

Site Tools


ubuntu:install_node.js

Ubuntu - Node.js - Install node.js

Update your system

sudo apt-get update
sudo apt-get install git-core curl build-essential openssl libssl-dev python

Install Node.js

Clone the Node.js repository:

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

NOTE: If you require a specific version of Node:

git tag # Gives you a list of released versions
git checkout v13.10.1

Compile and install Node

./configure
make
sudo make install

NOTE: This might take a while, depending on your hardware.

Check if node was installed correctly

node -v

Install NPM

curl -L https://npmjs.org/install.sh | sudo sh

WARNING: Running a script directly from the web can be dangerous, as it may contains trojans.

Instead, you may want to download the script, and then review the contents before actually installing it.


Test

npm -v
ubuntu/install_node.js.txt · Last modified: 2021/01/25 10:47 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki