Installing Node.js and NPM on Ubuntu 11.04

Post to Twitter

In my last article I installed Node on Ubuntu 10.10. Nothing really has changed for Ubuntu 11.04 but I want to have a separate article since a lot of people hit my installing Node articles. Also, keep in mind you can customize your Node installation using these gists – just make sure to read all the comments on the bottom of that page for any changes as I know at least one path was wrong in one of the examples.


[ad name=”Google Adsense”]

Assuming a clean install of Ubuntu 11.04 with all the current updates, here are the commands you need to install the latest version of Node on Ubuntu 11.04:

$ sudo apt-get update
$ sudo apt-get install git-core curl build-essential openssl libssl-dev
$ git clone https://github.com/joyent/node.git && cd node
$ ./configure
$ make
$ sudo make install
$ node -v
$ curl http://npmjs.org/install.sh | sudo sh
$ npm -v

Something to keep in mind if you want to run a specific version of Node you can use Nave. The code above right now installed Node v0.5.0-pre and NPM v1.0.10 and it is not meant for a production release.

Post to Twitter

This entry was posted in Node.js, Ubuntu. Bookmark the permalink.

15 Responses to Installing Node.js and NPM on Ubuntu 11.04

  1. Erin Millard says:

    I think you’re missing a line there:

    $ git clone https://github.com/joyent/node.git && cd node

  2. Chad Lung says:

    @Erin,

    Your right, thanks. Forgot to copy-n-paste that from my Linux VM.

    Chad

  3. Vishwanath says:

    Hey all please try
    git clone http://github.com/joyent/node.git && cd node

    if git clone https://github.com/joyent/node.git && cd node is not working for you

  4. Pingback: Install and Setup Node.js to Run Forever | The Developer Dude

  5. Matt Schrader says:

    Thanks Chad, one quick question though. Do you have an article of how to get a nodejs server up and running at startup? I have been messing around with init.d scripts and such and so far no luck.

  6. Matt Schrader says:

    Right as I posted that I noticed a link to here: http://garrows.com/?p=441. I’ll try that.

  7. Matt Schrader says:

    Well actually this article doesn’t get into running at system startup so I guess my question still stands.

  8. Chad Lung says:

    @Matt,

    I’d try the NodeJS group, but also this gist might help out:
    https://gist.github.com/1061419

    Chad

  9. nonpeter says:

    I’m running 11.04 and all I did was

    apt-get install nodejs

    It seems to be already in natty/universe.

  10. Pingback: Ubuntu 11.04 node.js install « bitsend

  11. Ryan says:

    +1 on what nonpeter said, I’m running Ubuntu 11.04 slaso and just did:

    sudo apt-get install nodejs

    and all worked fine

  12. Samar says:

    As per Ryan & Nonpeter it worked perfectly fine. The only problem i have is the version of the node it is running. It takes v0.2.6. Any idea how i could update the version here to v0.4.11 ?
    Thanks in advance.

  13. Samar says:

    Got it. Following chad. i could managed to get the latest version. Thanks.

  14. yoo says:

    Thanks. All worked well on ubuntu 11.10.

  15. yoo woo says:

    Yup, works perfect for 11.10, thanks!

Comments are closed.