curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused解决办法

网上很多资料https://raw.githubusercontent.com/Homebrew/install/master/install说的都是打开着个网址,我fq也打不开。
ping该地址返回超时
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused解决办法_第1张图片
但我手机上又能打开,然后看到说手机热点可以,我开了热点也不行,实在没法,想着ping IP地址试试,然后在https://www.ipaddress.com/查询 raw.githubusercontent.com对应的IP 地址,如下
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused解决办法_第2张图片
ping IP地址,可行
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused解决办法_第3张图片

然后修改host文件
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused解决办法_第4张图片
然后开始安装或者卸载
安装命令

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

卸载命令

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

你可能感兴趣的:(Mac使用指南)