自己系統上一直用的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
