Skip to content

Instantly share code, notes, and snippets.

@maxclaus
Created July 31, 2013 23:37
Show Gist options
  • Save maxclaus/6127224 to your computer and use it in GitHub Desktop.
Save maxclaus/6127224 to your computer and use it in GitHub Desktop.
Commands to install nodejs and npm for Linux
sudo apt-get remove nodejs nodejs-dev npm
sudo add-apt-repository ppa:richarvey/nodejs
sudo apt-get update
sudo apt-get install nodejs nodejs-dev npm
nodejs -v #outputs v0.10.13
npm -v #outputs v1.3.3
@maxclaus
Copy link
Author

Another option:

sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

@maxclaus
Copy link
Author

maxclaus commented Apr 9, 2014

Another option from binary:

# download binary from http://nodejs.org/download/
wget http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-x64.tar.gz
tar -zxvf node-v0.10.26-linux-x64.tar.gz
mkdir node
cp -r node-v0.10.26-linux-x64/* node
echo "PATH=$PATH:/opt/node/bin" > /etc/profile.d/node.sh
source /etc/profile

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