Skip to content

Instantly share code, notes, and snippets.

@jesusalber1
Last active February 27, 2024 13:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jesusalber1/6634156ea6caba427a4c to your computer and use it in GitHub Desktop.
Save jesusalber1/6634156ea6caba427a4c to your computer and use it in GitHub Desktop.
Install node.js
# Joyent instructions (https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions)
# Download from the source
curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash -
# Installing node directly (latest version)
sudo apt-get install --yes nodejs
# Build tools for npm
sudo apt-get install --yes build-essential
# Install node-gyp
sudo npm install -g node-gyp
# Check current version on https://github.com/creationix/nvm (current v0.25.4)
curl https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
source ~/.profile
#List all available versions
nvm ls-remote
#Install node version (current v0.12.7). Check versions: node-v; npm -v
nvm install v0.12.7
#Install node.js globally
cd ~/.nvm/versions/node/v0.12.7
chmod -R 755 bin/*
sudo cp -r {bin,lib,share} /usr/local/
# Install node-gyp
npm install -g node-gyp
# Done!
@blackjack417
Copy link

in 14 line sudo apt install npm

@legacychurch
Copy link

legacychurch commented Jul 5, 2022

@lalouge
Copy link

lalouge commented Feb 27, 2024

#node curl --silent --location https://deb.nodesource.com/setup_18.x | sudo bash - #nvm curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

Thank you. I got a deprecation warning when I tried using setup_0.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment