安装命令
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
在住目录下添加~/.zshrc文件,文件内容为
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
运行命令:source ~/.zshrc
输入 nvm --version 可检查是否安装成功
标签:mac,sh,HOME,nvm,安装,NVM,DIR From: https://www.cnblogs.com/xiaoxiaopao/p/16659420.html