Macでcurlが実行できない: (7) サーバーに接続できませんでした

Macでcurlが実行できない: (7) サーバーに接続できませんでした

突然、curl がbrewまったく実行できなくなりました。プロキシを有効にしておらず、自宅のネットワークで個人用の 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

関連情報