Skip to content

Instantly share code, notes, and snippets.

@gertig
Created March 15, 2011 12:28
Show Gist options
  • Save gertig/870665 to your computer and use it in GitHub Desktop.
Save gertig/870665 to your computer and use it in GitHub Desktop.
Install Node and npm on Mac OS X in a few simple steps. This is based on a gist by isaacs
#Execute all of these commands starting at your root. you can type: cd ~ to make sure you are there
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bash_profile # Mac OS X runs .bash_profile not .bashrc each time a new terminal window is opened.
. ~/.bash_profile
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # this takes a couple of minutes
curl http://npmjs.org/install.sh | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment