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

东明兄 2020-12-17
0条评论 989 次浏览
东明兄 2020-12-170条评论 989 次浏览

使用命令
curl -L https://get.rvm.io | bash -s stable
在mac安装ruby报错:Failed to connect to raw.githubusercontent.com port 443: Connection refused

原因是国内dns被污染,无法解析正确的ip地址,在host文件加入:

#因为dns被污染导致ruby无法安装的解决方案
199.232.28.133 raw.githubusercontent.com

(修改host推荐使用switchHost)

站点的ip地址有可能变更,通过:https://githubusercontent.com.ipaddress.com/raw.githubusercontent.com 可查询真实ip地址

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注