Skip to content

Instantly share code, notes, and snippets.

@lavaldi
Created March 12, 2016 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lavaldi/66cd388b77f5b1f60dc6 to your computer and use it in GitHub Desktop.
Save lavaldi/66cd388b77f5b1f60dc6 to your computer and use it in GitHub Desktop.
Install node.js in Ubuntu

#Debian and Ubuntu based Linux distributions

Also including: Linux Mint, Linux Mint Debian Edition (LMDE), elementaryOS and others.

Node.js is available from the NodeSource Debian and Ubuntu binary distributions repository (formerly Chris Lea's Launchpad PPA). Support for this repository, along with its scripts, can be found on GitHub at nodesource/distributions.

NOTE: If you are using Ubuntu Precise or Debian Wheezy, you might want to read about running Node.js >= 4.x on older distros.

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

Alternatively, for Node.js v5:

curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs

Optional: install build tools

To compile and install native addons from npm you may also need to install build tools:

sudo apt-get install -y build-essential

Source: Installing Node.js via package manager

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