使用 nvm 来管理多个 nodejs 版本。
nvm 安装
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
或者
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
安装Node.js
nvm install <version>
使用所需版本
nvm use <version>