nodejs

Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world.

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.

Arch Linux

Node.js and npm packages are available in the Community Repository.

1
pacman -S nodejs npm

Debian and Ubuntu based Linux distributions

Also including: Linux Mint, Linux Mint Debian Edition (LMDE), elementaryOS, bash on Windows and others.

NOTE: If you are using Ubuntu Precise or Debian Wheezy, you might want to read about running Node.js >= 6.x on older distros.

1
2
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs

Alternatively, for Node.js 8:

1
2
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

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

1
sudo apt-get install -y build-essential

Enterprise Linux and Fedora

Including Red Hat® Enterprise Linux® / RHEL, CentOS and Fedora.
On RHEL, CentOS or Fedora, for Node.js v6 LTS:

1
curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -

Alternatively for Node.js 8:

1
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

Then install:

1
sudo yum -y install nodejs

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

1
2
sudo yum install gcc-c++ make
# or: sudo yum groupinstall 'Development Tools'