Install the latest version of node. js on Ubuntu

  • 2020-03-30 03:31:42
  • OfStack

Node. js contains the Google V8 JavaScript engine, the libuv library, and the core libraries are almost all written in JavaScript. The libuv library provides an abstraction of asynchronous event I/O and a cross-platform mechanism for node. js.

Node. js was originally created by Ryan Dahl and is currently being evolved and maintained by Isaac Schlueter.

There are many articles on the Internet that compile and install node. js from source code, and I strongly recommend against this approach. In most cases, the package maintainer knows the structure of the software so well that the developer doesn't have to compile the latest version of the source code from scratch.

The following methods apply to the latest versions of Ubuntu, Ubuntu 12.04 LTS, Ubuntu 12.10, Ubuntu 13.04, etc. It helps developers install node. js on Ubuntu without having to compile the installation from scratch. You can execute the following commands on the cloud host:

# apt-get update
# apt-get install -y python-software-properties software-properties-common
# add-apt-repository ppa:chris-lea/node.js
# apt-get update
# apt-get install nodejs

Once the command is executed, the latest version of node. js is installed, and there are no worries. Once a new version of node. js is released, you can upgrade directly from the package manager without having to recompile and install from scratch.

Related articles: