How to install Node.js 10 or 12 on Linux Ubuntu 18.04 / Debian 9 (Stretch) without weird script of the website
1 min readJul 14, 2018
EDIT : just follow these instructions from https://github.com/nodesource/distributions/blob/master/README.md#deb :
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
Because the repository of Node.js is in HTTPS, it is necessary to install this:
sudo apt install apt-transport-https
I add this in /etc/apt/sources.list:
deb https://deb.nodesource.com/node_10.x stretch main
And I do:
wget -q -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
sudo apt update
sudo apt install nodejs
And nothing else!
Notes
Node.js 10 is not compatible on 32 bit system.