赞
踩
使用curl安装的时候,比如安装homebrew会出现类似 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
的问题,出现的原因一般是 github 的一些域名的 DNS 解析被污染,导致DNS 解析过程无法通过域名取得正确的IP地址,详见DNS污染。
打开 https://www.ipaddress.com/ 输入访问不了的域名,比如https://raw.githubusercontent.com
,查询之后可获得正确的IP地址:
在本机的 host 文件中添加以下内容,建议使用 switchhosts 方便 host 管理:
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
这样就能正常安装了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。