关于安装nvm 报错Failed to connect to raw.githubusercontent.com port 443: Connection refused

关于安装nvm 报错Failed to connect to raw.githubusercontent.com port 443: Connection refused

修改DNS地址解决问题

试了CSDN其他人的所有方法,结果偶然在知乎看到一种解决方法。完美解决。方法如下:

在命令行窗口输入:(这次设置DNS仅此次生效,重启即恢复原样)

sudo vim /etc/resolv.conf

将出现的界面修改为如下界面:

nameserver 114.114.114.114

或者是

nameserver 8.8.8.8

在输入刚才的命令

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash

发现完美解决。

`

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
引用\[1\]:根据引用\[1\]中的内容,你可以使用以下命令来安装或更新nvm: ``` wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh > nvm_install.sh sudo ./nvm_install.sh ``` 引用\[2\]:根据引用\[2\]中的内容,你也可以使用以下命令来安装或更新nvm: ``` curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash ``` 引用\[3\]:根据引用\[3\]中的内容,如果你在执行安装脚本时遇到了问题,可以尝试手动运行`git fetch`命令来更新nvm。具体步骤如下: ``` cd ~/.nvm git fetch ``` 问题:Failed to download 'https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/nvm.sh' 回答: 如果在下载 'https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/nvm.sh' 时出现错误,可能是由于网络连接问题导致的。你可以尝试重新运行下载命令,或者检查你的网络连接是否正常。如果问题仍然存在,你可以尝试使用其他下载方式,比如使用cURL命令或者手动下载脚本并运行。 #### 引用[.reference_title] - *1* [nvm 多版本node切换](https://blog.csdn.net/fareast_mzh/article/details/93620010)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [安装nvm遇到的天坑](https://blog.csdn.net/weixin_43254015/article/details/131436602)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值