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)"

然后可以下载和安装了。



免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM