apt-get安装的最新版本的NodeJS [英] last version of NodeJS install by apt-get
问题描述
Debian Linux(Debian Stable,UBUNTU LTS等)和其他人使用apt-get
作为良好而可靠的安装程序工具.我只需要使用 apt-get
...问题是我做的很简单
Debian Linux (Debian Stable, UBUNTU LTS, etc.) and others use apt-get
as good and reliable installer tool. I need to use only apt-get
... The problem is that I do the simple
sudo apt-get install nodejs
但是结果是我有nodejs --version
(或node --version
)
0.10.41
(!)不是今天的最新的稳定Node.JS版本,
5.2.0
我也尝试node -p process.versions.v8
结果
3.14.5.9
因此,也小于 5.2 .
我正在使用UBUNTU 14 LTS....并尝试解决方法,但无效,
I am using UBUNTU 14 LTS.... And try a workaround but not works,
sudo apt-get remove --purge nodejs
sudo apt-get remove --purge node #enforce any lapse
并且,作为此建议 >
And, as this suggestion
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs
不起作用,一些结果.
推荐答案
从nodesource安装时,需要指定要安装的版本.
When installing from nodesource, you need to specify which version you want to install.
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_iojs_3.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_iojs_2.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_iojs_1.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_0.10 | sudo -E bash -
之后
sudo apt-get install -y nodejs
(或iojs为sudo apt-get install -y iojs
)
在使用没有任何版本的url时(如您所做的那样),由于某种原因,您似乎获得了节点0.10.
When using the url without any version (as you did), it seems you get node 0.10 for some reason.
您会在此处找到更多信息.
这篇关于apt-get安装的最新版本的NodeJS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!