0

I have a Debian Jessie and latest Node version available with apt is 8.9.0.

What's the easy way to install the latest version aka 11.3.0 ? (and the latest NPM also)

doom
  • 3,276
  • 4
  • 30
  • 41

2 Answers2

1

I think easiest way to manage Node.js versions is to use n

Installation

$ curl -L https://git.io/n-install | bash

Usage

$ n 11.3.0 #Install node 11.3.0 version
$ n latest #Install or activate the latest node release
$ n stable #Install or activate the latest stable node release
ponury-kostek
  • 7,824
  • 4
  • 23
  • 31
0

The easier way seems to be :

INSTALLATION

  1. Go to https://nodejs.org/en/download/current/ and copy url of your architecture Linux binaries (here Linux Binaries x64)
  2. Install xz-utils if needed : sudo apt-get install xz-utils
  3. write these commands

commands :

wget https://nodejs.org/dist/v11.3.0/node-v11.3.0-linux-x64.tar.xz
unxz node-v11.3.0-linux-x64.tar.xz
sudo tar --directory /usr/local --strip-components 1 -xf node-v11.3.0-linux-x64.tar
rm node-v11.3.0-linux-x64.tar

It should untar the archive in /usr/local which is already in the PATH and secure_path.


TEST

node -v return v11.3.0

npm -v return 6.4.1


UPDATE

To update, just make the same with new version and update NPM packages with npm update (not tested yet).

doom
  • 3,276
  • 4
  • 30
  • 41