Latest Version Installation method
Today, tinkering with Ubuntu, found that Nodejs is always unable to upgrade to the latest version, tinkering for a few hours, record.
1. Installationnpm
sudo apt install npm
2. Upgrade npm
to the latest version
sudo npm install [email protected] -g
At this point npm -v
you can find npm
the version number is the latest version 4 .10.3
;
3 nodejs
. Install the module for installationn
sudo npm install -g n
4, then through n
the module installation of the specified version nodejs
, the n
module more information please refer to the official documentation
//安装官方最新版本sudo n latest//安装官方稳定版本sudo n stable//安装官方最新LTS版本sudo n lts
Update to 5.3.0 by installing the latest version of the nodejs
8.4.0,npm and then by discovering that the node -v
node
installation was successful
Install the latest stable version of node and NPM on Ubuntu