我在Ubuntu 14.04 64位中执行了以下命令。
sudo apt-get update
sudo apt-get install nodejs modejs-legacy npm
我有版本
npm -v
1.3.10
nodejs -v
v0.10.25
这些比AngularJS 2的推荐版本旧。
为什么apt-get下载旧版本? 如何更新到更新的版本?
我在Ubuntu 14.04 64位中执行了以下命令。
sudo apt-get update
sudo apt-get install nodejs modejs-legacy npm
我有版本
npm -v
1.3.10
nodejs -v
v0.10.25
这些比AngularJS 2的推荐版本旧。
为什么apt-get下载旧版本? 如何更新到更新的版本?
Debian / Ubuntu在他们的包管理器中有旧版本,你必须使用如下所述的自定义PPA存储库:
设置它:
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
然后用Ubuntu安装:
sudo apt-get install --yes nodejs