在Ubuntu 14.04中安装最新的Node.js版本 [英] Install latest nodejs version in ubuntu 14.04
本文介绍了在Ubuntu 14.04中安装最新的Node.js版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我在ubuntu 14.04 LTS中安装 nodejs 的方式:
This is the way I installed nodejs in ubuntu 14.04 LTS:
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get install nodejs
当我用以下方法检查节点版本时:
When I checked the node version with this:
node -v
我明白了
v0.10.37
但是最新版本是4.2.6和5.5.0.如何获得最新或更新版本?
But the latest version is 4.2.6 and 5.5.0. How can I get the latest or update version?
推荐答案
sudo apt-get install curl
对于Node.js v4
For Node.js v4
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
对于Node.js v5:
For Node.js v5:
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs
Node.js v6:
Node.js v6:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
Node.js v7:
Node.js v7:
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
Node.js 8:
Node.js 8:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
https://nodejs.org/en/download/package-manager/
这篇关于在Ubuntu 14.04中安装最新的Node.js版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文