centOS和mac 安装nvm
安装方式
注意版本号
- curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.38.0/install.sh | bash
- centOs的wget
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.38.0/install.sh | bash
- git
git clone git://github.com/creationix/nvm.git ~/nvm
问题
不管使用上面的哪种那装方式,大概率会遇到这个问题,使用gitee解决
- gitee
git clone https://gitee.com/mirrors/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
- 配置bash
vi ~/.bash_profile
// ~/.bash_profile 文件添加如下内容
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
source ~/.bash_profile
- 配置shrc
vim ~/.zshrc
// ~/.zshrc 文件添加如下内容
source ~/.bash_profile
source ~/.zshrc