使用nvm进行管理:
1、打开 https://github.com/creationix/nvm, 找到README.md中的:
Installation
Install script
To install or update nvm, you can use the install script using cURL:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
or Wget:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
2、复制标红命令到cmd窗口中执行
3、安装完成后cmd窗口最后会输出:
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
将标红命令依次复制到命令行里执行,完成环境适配
4、nvm完成安装。执行
nvm install 0.12.4
版本号可以依据自己需求进行修改。
时间: 2024-10-12 13:08:28