去nvm github上按照install script,用curl或者wget。都試一下。注意若是一種方式失敗了,請先刪除殘留文件再試另外一種方法。node
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
上述步驟後,nvm還不能用,必須用nvm.sh。執行如下兩行命令行便可git
export NVM_DIR=~/.nvm source ~/.nvm/nvm.sh
nvm install 5.0 //下載 nvm alias default 5.6 //指定新開的shell默認的node 版本
git config --global credential.helper store//帳號密碼cachegithub