无法在 Mac 上执行任何操作 curl: (7) 无法连接到服务器

无法在 Mac 上执行任何操作 curl: (7) 无法连接到服务器

突然间,我brew根本无法使用 curl 或运行。我没有启用任何代理,只是在家庭网络上运行我的个人 Mac。我该如何调试/修复此问题?

scutil -r google.com            ✔  22:33:48
Reachable
curl google.com                 ✔  22:34:56
curl: (7) Couldn't connect to server
curl: (7) Couldn't connect to server
==> Downloading https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_2/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz

curl: (7) Couldn't connect to server
Error: Failed to download https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz and https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_2/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz!

Do not file an issue on GitHub about this; you will need to figure out for
yourself what issue with your internet connection restricts your access to
both Bintray (used for Homebrew bottles/binary packages) and GitHub
(used for Homebrew updates).
Error: Failed to install Homebrew Portable Ruby (and your system version is too old)!

答案1

使用以下选项获取更详细的输出-v

curl -v google.com

这应该有助于您追踪问题。

答案2

我对此进行了大量的调试。观察了 lulu 中的出站流量,分析了网络日志和 curl 的详细输出。不确定为什么会失败。Brew 也失败了。我升级到了 Big Sur,一切都解决了。

答案3

有类似的问题。

更新所有内容后修复:

brew install curl

相关内容