109

Where can (can I ?) find .deb packages for the latest versions of Node.js ?

If not, and because it's a project that progresses very fast, what is the easiest way to keep up with the releases of Node.js ?

  • Adding some PPA and it will be updated when there's a new package ?
  • ./configure && make && ln -s ./node /usr/bin/node ?
  • Some other way you know and I can't imagine but hopefully you will share ?
Yves M.
  • 29,855
  • 23
  • 108
  • 144
João Pinto Jerónimo
  • 9,586
  • 15
  • 62
  • 86

6 Answers6

226

Most up-to-date ppa for nodejs https://launchpad.net/~chris-lea/+archive/node.js/

sudo add-apt-repository ppa:chris-lea/node.js  
sudo apt-get update  
sudo apt-get install nodejs

NOTE: If your system does not have add-apt-repository, it can be installed like so:

sudo apt-get install python-software-properties
Chris Kimpton
  • 5,546
  • 6
  • 45
  • 72
Cris-O
  • 4,989
  • 3
  • 17
  • 11
  • I tried this off of a github wiki page and got 0.4x when I wanted 0.6x. The marked answer worked better for me. – jcollum Mar 16 '12 at 04:45
  • 2
    It currently has 0.8.16. That was released by upstream on 2012-12-13, and built in the PPA on 2012-12-15. 0.8.15 came out on 2012-11-26 and was built in the PPA on 2012-12-09. That looks like pretty tight tracking to me. – Tom Anderson Jan 11 '13 at 12:26
  • Alas it's not tight at all now... I have 0.10.12 which is being shown in Ubuntu as the latest and greatest, whereas the world has moved onto 0.10.20 – kumarharsh Oct 16 '13 at 13:47
  • @Hash have a look at Chris Lea's comment, it explains the situation and the fix. – Gerry Oct 31 '13 at 04:48
  • Note that if the rlwrap package is not found you need to enable the Ubuntu universe repository to fix the broken dependency. – gezpage Dec 01 '13 at 16:25
  • 1
    As per `http://stackoverflow.com/questions/13018626/add-apt-repository-not-found` for >= 12.10 `sudo apt-get install software-properties-common` – Tom Roggero Jan 03 '14 at 01:19
  • I use your PPA as well and thanks, one thing is that I have to sudo to install a global package which I have done. But using yeoman fail because I cant sudo is there a way to get this right/ – LouieV Jul 31 '14 at 01:57
  • But if you install from a PPA, you end up with `root` owning lots of `npm` folders, and `npm install -g` is a pain unless you [manually change permissions of system folders](http://stackoverflow.com/a/18414606/3886390). I think NVM is the way to go. – Michael Martin-Smucker Aug 02 '14 at 15:08
  • WARNING - This answer is outdated! [Now (July 2015) correct answer](https://askubuntu.com/questions/586671/installing-node-js-through-a-ppa-does-not-fetch-the-latest-version/596325#596325?newreg=4c2f3704b8694081a980fba059cfbe48) – honzajde Jul 26 '15 at 22:10
82

I'm the maintainer of the PPA listed above. I actually maintain three distinct Node PPAs:

https://launchpad.net/~chris-lea/+archive/node.js https://launchpad.net/~chris-lea/+archive/node.js-devel https://launchpad.net/~chris-lea/+archive/node.js-legacy

They contain the current release, the development release, and the "previous stable line" respectively. Here's some more info on using them:

https://chrislea.com/2013/03/15/upgrading-from-node-js-0-8-x-to-0-10-0-from-my-ppa/

I currently intend to keep maintaining these unless the Joyent folks start maintaining their own repositories. They have me on IM so I'm generally quite aware of when new releases are coming out, and I try to put up new builds within a day of the source code being available.

Rudie
  • 52,220
  • 42
  • 131
  • 173
Chris Lea
  • 1,001
  • 8
  • 4
  • 7
    Well, I suppose the joyent folks are pretty satisfied with you doing this job so far and have no intention to take it from your hands. Why would they, right? =P Anyway, your repository is the only way to install Node that have never failed me. And it did it again today. Thanks! – slacktracer Nov 09 '13 at 00:29
  • You should send downloads stats to the joyent folks. It could be interesting for them. – jgomo3 Mar 14 '14 at 01:27
  • 4
    Thank you for maintaining this PPA. You are a champ! – anbiniyar Apr 13 '14 at 04:51
  • This is now heavily outdated. Still running 0.x. Dont use it. Look at Chris' comment below. – DarkNeuron Aug 12 '16 at 15:02
43

You could also use tools like for example nvm which can help you install node and even have multiple versions.

Alfred
  • 60,935
  • 33
  • 147
  • 186
8

me again (the maintainer of the above referenced PPA on Launchpad).

In a going forward sense, I will be making packages under the banner of the NodeSource organization. Please see here:

https://nodesource.com/blog/chris-lea-joins-forces-with-nodesource

Same me doing the work, same functionality, just a better support system and more resources to make sure I'm doing things right. Enjoy.

Chris Lea
  • 1,001
  • 8
  • 4
4

For those who keep falling into this thread from search engines

Currently (Dec 2015) nodesource.com keeps up-to-date node repos for several distros. Installing up-to-date nodej js is as simple as pasting this snippet into console:

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs

You'll find more info on installing node in different version or different distributions here: https://github.com/nodesource/distributions#installation-instructions

Chris Lea PPA stopped at 0.10 and Chris joined forces with nodesource :)

Community
  • 1
  • 1
seler
  • 8,803
  • 4
  • 41
  • 54
1

If it's the latest version of Node.js you wish to install, the easiest method is to use Node Version Manager (NVM). It's safer than upgrading the node packages in Ubuntu to unsupported versions from PPAs or 3rd party repos, which may cause conflicts or breakages in apt package management system. Compared to NVM, manual installations from tarballs are harder to maintain and upgrade. Follow these steps to install the latest node using NVM:

Step 1: Install NVM

Run this command in Terminal:

wget -qO- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash

Step 2: Install node

Once NVM installation is complete, close and reopen Terminal. Then run this command:

nvm install node

Step 3: Check node version

Run these commands:

node --version
npm --version

If everything went well, you'll see the latest node and npm versions as output. That's all, node is installed and ready to run!

Keep up with the latest node

Even if you install the latest version of node, you may have to upgrade it a few weeks or months later due to the fast paced development of node. NVM makes it easier to upgrade, while at the same time enabling migration of previously installed global npm packages. Run this command to upgrade:

nvm install node --reinstall-packages-from=node