推荐方法:
$ git clone https:
$ nvm install
7.4.0
source ~/git/nvm/nvm.sh
source ~/.profile
$ nvm
alias default 0.12
default ->
7.4.0 (-> v7
.4.0)
其他方法: 1.编译包解压+配置变量
wget
https:/
/npm.taobao.org/mirrors/node/latest-v4.x/node-v4.
4.7-linux-x64.tar.gz
tar -zxvf node-v4.
4.7-linux-x64.tar.gz
export
PATH=
$PATH:/opt/node-v4.
4.7-linux-x64/bin
2.源码包编译+安装+配置变量
3.apt-get安装