Installing Node.js v.4 with APT on Ubuntu 14.04

Posted by Barnaby Knowles on 12 March 2016, 10:54 pm

Node.js is an increasingly-popular JavaScript runtime that can be used to build server-side applications. Installing Node on Ububtu 14.04 via APT isn’t quite as straightforward as it could be, as the version in the default repositories is 0.10.25, dating back to early 2014.

Ways to install Node.js

You have a number of options at the Node.js download page, depending on your platform. Windows and Mac users have pre-built installers, but none currently exists for Ubuntu.

You could download the source via the link above and build it yourself, but who wants to do that when we have a package manager?

Add the NodeSource PPA to APT!

The good news is that we can install Node.js v.4 (and above) using APT. You just have to add the NodeSource PPA.