Installing Node.js via package manager

Note: The packages on this page are maintained and supported by their respective packagers, not the Node.js core team. Please report any issues you encounter to the package maintainer. If it turns out your issue is a bug in Node.js itself, the maintainer will report the issue upstream.

Debian and Ubuntu based Linux distributions

Node.js is available from the NodeSource Debian and Ubuntu binary distributions repository (formerly Chris Lea's Launchpad PPA). Support for this repository, along with its scripts, can be found on GitHub at nodesource/distributions.

To compile and install native addons from npm you may also need to install build tools:

sudoapt-getinstall -y build-essential

Available architectures:

i386 (32-bit)

amd64 (64-bit)

armhf (ARM 32-bit hard-float, ARMv7 and up: arm-linux-gnueabihf)

Supported Ubuntu versions:

Ubuntu 14.04 LTS (Trusty Tahr)

Ubuntu 16.04 LTS (Xenial Xerus)

Supported Debian versions:

Debian 7 (wheezy)

Debian 8 / stable (jessie)

Debian testing (stretch, aliased to jessie)

Debian unstable (sid)

A Node.js package is also available in the official repo for Debian Sid (unstable), Jessie (testing) and Wheezy (wheezy-backports) as "nodejs". It only installs a nodejs binary.

The nodejs-legacy package installs a node symlink that is needed by many modules to build and run correctly.
The Node.js modules available in the distribution official repositories do not need it.

Supported Linux Mint versions:

Linux Mint 17 "Qiana" (via Ubuntu 14.04 LTS)

Linux Mint 17.1 "Rebecca" (via Ubuntu 14.04 LTS)

Linux Mint 17.2 "Rafaela" (via Ubuntu 14.04 LTS)

Linux Mint Debian Edition (LMDE) 2 "Betsy" (via Debian 8)

Supported elementary OS versions:

elementary OS Freya (via Ubuntu 14.04 LTS)

Supported Trisquel versions:

Trisquel 7 "Belenos" (via Ubuntu 14.04 LTS)

Supported BOSS versions:

BOSS 5.0 "Anokha" (via Debian 7)

Enterprise Linux and Fedora

Including Red Hat® Enterprise Linux® / RHEL, CentOS and Fedora.

Node.js is available from the NodeSource Enterprise Linux and Fedora binary distributions repository. Support for this repository, along with its scripts, can be found on GitHub at nodesource/distributions.

Note that the Node.js packages for EL 5 (RHEL5 and CentOS 5) depend on the EPEL repository being available. The setup script will check and provide instructions if it is not installed.

Additionally, versions of CentOS and Scientific Linux corresponding to the above RHEL versions are also officially supported by all EPEL packages, including nodejs. Amazon Linux is not officially supported by EPEL due to significant incompatibilities previously reported to the epel-devel mailing list, however you might find that nodejs at least still works.

Gentoo

NetBSD

Node.js is available in the pkgsrc tree:

cd /usr/pkgsrc/lang/nodejs &&makeinstall

Or install a binary package (if available for your platform) using pkgin:

pkgin -y install nodejs

nvm

Node Version Manager is a bash script used to manage multiple released Node.js versions. It allows
you to perform operations like install, uninstall, switch version, etc.
To install nvm, use this install script.

On Unix / OS X systems Node.js built from source can be installed using
nvm by installing into the location that nvm expects: