How to Install the Latest Versions of NodeJS For Ubuntu

2017-01-11 15:24:00来源:作者:robustwang人点击

Use the NodeSource PPA. For details look at the installation instructions. First, choose the Node.js version you need and add the sources for it:

# for Node.js v4curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -# OR for Node.js v5curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -# OR for Node.js v6curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -# OR for Node.js v7curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -

Then install the Node.js package.

sudo apt-get install -y nodejs

P.S.: curl package must be installed on server for these code lines.

Upgrading

If you have nodejs already installed and want to update, then first remove current instalation and install it again using scripts above.

sudo apt-get purge nodejs npm

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台