« How to get JungleDisk Desktop running on Ubuntu 11.10 and Gnome 3 | Main | How to build a JavaScript project with Maven »
Wednesday
Dec282011

How to compile Node.js from source with Ubuntu

UPDATE: Works with Node.js 0.6.6 and 0.6.7 on Ubuntu 11.10 (Oneiric Ocelot) / Linux Mint 12 (Lisa).

There are no pre-compiled packages for Linux, so if you want to use Node.js, you'll have to build it yourself. It's easy enough though, and here's how.

Download and unpack Node.js Source

You can obtain the release version from their website or get an edgier version from their Git source repository. If you acquired it from the former source, you'll need to decompress it first, for instance to /usr/local/src/.

(optional) Install the build tools

If you haven't done this before, your system most likely won't have the required tools for software compilation. You can easily install them: 

sudo apt-get install build-essential checkinstall 

(optional) Install openssl-dev

If you want to compile with SSL support (default), you'll also need to install the OpenSSL Development Packages, like so:

sudo apt-get install libssl-dev

Build Node.js

Open up a terminal witndow and navigate to the directory that contains the Node.js source, e.g. /usr/local/src/node-0.6.6. And execute the following commands in succession: 

./configure
make
sudo make install

If all goes well, you should be able to access the node command from any terminal window.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>