我想将nvm安装到我的ubuntu,但我认为存在网络问题
要安装nvm,我使用此代码:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
输出错误:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:19 --:--:-- 0curl: (6) Could not resolve host: raw.githubusercontent.com
而且在19秒内总是出错,顺便说一句,我为Linux使用Windows子系统
有什么办法解决这个问题?
尝试此命令
curl -vs -o /dev/null http://somehost/somepage 2>&1
使用命令下载文件并将其另存为install.sh curl -x -o install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh
使用chmod +x install.sh
授予必要的权限然后以./install.sh