Fast way to install Node.js on Linux and OSX

2012-08-01 ·

The fastest way I know to install Node.js on *nix systems is by using Node Version Manager. This script helps you as well easily manage multiple Node.js versions.

Dependencies

For Ubuntu/Debian, install following packages:

apt-get install libssl-dev git-core pkg-config build-essential curl gcc g++
checkinstall

For OSX, you must have XCode installed.

NVM

Clone NVM repository to your home directory and activate it by sourcing the script.

git clone git://github.com/creationix/nvm.git ~/nvm
source ~/nvm/nvm.sh

You should add the last line to your .bashrc or .zshrc.

Install Node.js

In order to install Node.js just issue the following command:

nvm install v0.8.8

And to use it, do:

nvm use v0.8.8

That's all.

Copyright © 2018 All rights reserved.
Powered by Kulfon.