home brew 突然 curl: (7) Failed to connect to 错误,谷歌了半天没找到答案。

2017-04-09 22:19:34 +08:00
 Vkin
电脑挂的 ss 全局代理,之前 home brew 完全使用正常, 3 月份的时候用 homebrew 安装了 charles ,然后导入了 charles 的 https 证书 到 mac 上。

今天使用 home brew 安装软件, brew cask install keka 结果提示 curl: (7) Failed to connect to github-cloud.s3.amazonaws.com port 443: Operation timed out 。

于是乎 brew doctor 检测问题,提示 Your system is ready to brew.
brew update , brew upgrade. 均能正常更新使用

然后开始谷歌,搜了各种方法都没用,最后看到这位作者的解决方法, http://www.itkeyword.com/doc/9020916023480990x231/brew%20install%20opencv 想到可能是 charles 的证书导致的,最后删除了 charles 的证书,按照他的方法添加了环境变量,再次 brew doctor 却提示:
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: SSL_CERT_DIR support was removed from Apple's curl.
If fetching formulae fails you should:
unset SSL_CERT_DIR
and remove it from ~/.bash_profile if present.

Warning: Setting SSL_CERT_FILE can break downloading files; if that happens
you should unset it before running Homebrew.

Homebrew uses the system curl which uses system certificates by
default. Setting SSL_CERT_FILE makes it use an outdated OpenSSL, which
does not support modern OpenSSL certificate stores.

忽略后 brew cask install keka 提示:

==> Satisfying dependencies
complete
==> Downloading https://github.com/aonez/Keka/releases/download/v1.0.8/Keka-1.0.
Warning: ignoring SSL_CERT_DIR environment variable, not supported by libcurl


心累,求大神帮忙看看
19465 次点击
所在节点    macOS
22 条回复
faceair
2017-04-09 22:51:35 +08:00
终端程序大部分不走系统代理,你可能需要想办法给 brew 挂上代理
Vkin
2017-04-09 23:22:57 +08:00
@faceair 尝试了在 bash.profile 里面加上 全局代理,依然不行,另外我之前在 ss 开全局, brew 都能正常下载安装,刚才在终端 ping github.com 也可以 ping 通。
iakisey
2017-04-09 23:28:33 +08:00
ping Google 试试,终端确实不走代理,上 proxychains4 试试?
Vkin
2017-04-09 23:49:45 +08:00
@iakisey 谷歌竟然 ping 不通。。难不成之前能正常 brew 是因为之前 亚马逊云服务可以正常访问? 那我试试 proxychains4
appppap
2017-04-09 23:55:07 +08:00
给你的提议,千万不要重做 brew ,后果是你之前安装的软件可能会消失。
mritd
2017-04-09 23:56:52 +08:00
iCyMind
2017-04-09 23:58:08 +08:00
不仅 brew ,很多终端应用不走代理的,有得烦。在上级路由 fq ,不用管这些糟心事了。
硬件路由不能 f ,可以试试用虚拟机接管本机流量。

https://www.v2ex.com/t/319006#reply2
Vkin
2017-04-10 00:14:17 +08:00
@appppap 差一点就重做 brew 了,多谢提醒!
Vkin
2017-04-10 00:19:26 +08:00
@iakisey [由于 Mac 的 sip 保护,导致了 Proxychains 无法正常工作,残念。(OS X 10.11 版本以上都 GG) ] 这个你是怎么解决点的?有个方法说是要有配置 polipo....
Vkin
2017-04-10 00:25:52 +08:00
@mritd 感谢,这个牛!
Vkin
2017-04-10 00:27:03 +08:00
@iCyMind 闲下来时,折腾折腾。
Shiweizhi
2017-04-10 00:59:26 +08:00
Vkin
2017-04-10 01:36:37 +08:00
@iCyMind 刚才把路由器设置了全局代理,本机浏览器可以翻墙,查询 ip 地址也是路由器的翻墙 IP ,但是 ping google.com 依然 ping 不通,是怎么回事呃?
Vkin
2017-04-10 01:59:14 +08:00
路由器翻墙搞定了, brew install ,待会试试 虚拟机跑流量。
Chingim
2017-04-10 03:15:39 +08:00
ping 不通 google, 可能是因为解析到了一个假的 ip?
ynyounuo
2017-04-10 03:31:25 +08:00
ping?
你们认真的吗?
tyfulcrum
2017-04-10 03:36:34 +08:00
export https_proxy=http://uri:port;export http_proxy=http://uri:port
终端挂代理用这个就好啦,不用那么复杂。
iCyMind
2017-04-10 04:20:01 +08:00
@tyfulcrum 有些应用就是不支持这个变量呀
clavichord93
2017-04-10 08:17:46 +08:00
你这肯定是没代理啊…
Vkin
2017-04-10 13:22:34 +08:00
@clavichord93 我还以为是 charles 的 ssl 证书导致的,因为之前一直是可以正常使用...尴尬了,通过路由器翻墙解决了这个问题。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/353655

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX