自己系统上一直用的1.0版本的,想要更新直接apt肯定不行的.于是找了一种比较方便的安装方式.

  如果想安装最新的 6.x 版本 只需要

1 #Using Ubuntu
2 curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
3 sudo apt-get install -y nodejs
4 
5 node -v

  如果要安装目前最稳定的4.x版本,改下curl的地址即可

1 # Using Ubuntu
2 curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
3 sudo apt-get install -y nodejs
posted on 2016-09-01 13:10  睡着的糖葫芦  阅读(1682)  评论(0编辑  收藏  举报