1.在/etc/hosts设置下列github重定向
https://blog.csdn.net/laoxuan2011/article/details/106177126/
2.执行命令安装brew
/bin/bash -c “$(curl https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
不要安装node,要安装nvm
删除node
brew remove node
安装nvm
brew install nvm
配置相关
brew install zsh-completion
添加到vi ~/.zshrc
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
autoload -Uz compinit
compinit
fi
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
source ~/.zshrc
输入命令compaudit,将没有权限的文件或文件夹授权
compaudit
chmod -R /usr/local/share/zsh
相关nvm 命令
https://ww