linux系统安装nvm
直接用脚本一键安装
sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
如果报错:curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒绝连接
说明github远程主机解析失败,需要配置dns映射
修改host文件
vim /etc/hosts
添加
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
如果文件只读,可以修改权限
sudo chmod 666 /etc/hosts
执行命令安装按成后生效环境变量
source ~/.bashrc