1、安装命令
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
2、可能会遇到源出现问题,这时需要设置hosts代理,
可以安装SwitchHosts
,配置代理如下:
199.232.68.133 raw.githubusercontent.com
199.232.68.133 user-images.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com
然后重新安装即可。
3、安装完成,确认一下.zshrc
中存在nvm
环境变量如下:
export NVM_DIR="$HOME/.nvm"
[ -s “KaTeX parse error: Expected 'EOF', got '&' at position 19: …_DIR/nvm.sh" ] &̲& \. "NVM_DIR/nvm.sh” # This loads nvm
[ -s “KaTeX parse error: Expected 'EOF', got '&' at position 28: …_completion" ] &̲& \. "NVM_DIR/bash_completion” # This loads nvm bash_completion
4、然后source .zshrc
5、重开窗口,输入nvm -v
能够看到安装成功