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

问题描述

Mac 安装 Homebrew 连接被拒绝

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

原因

国内安装 Homebrew 需要FQ。


解决方案

先试试浏览器是否能打开 https://raw.githubusercontent.com/Homebrew/install/master/install,如果打不开,需要自行找个代理。

如果能打开,但是访问还是被拒绝,查看自己的代理方式和代理端口,

如我的代理地址是 http://127.0.0.1:1087,curl 用 -x 参数设置代理如下

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

然后可以下载和安装了。


posted @ 2020-05-18 23:35  whosmeya  阅读(2817)  评论(0编辑  收藏  举报