如果按照 Get the Dart SDK | Dart 提供的方案就会出现
➜ ~ brew tap dart-lang/dart
==> Tapping dart-lang/dart
Cloning into '/opt/homebrew/Library/Taps/dart-lang/homebrew-dart'...
^C
➜ ~ brew tap dart-lang/dart
==> Tapping dart-lang/dart
Cloning into '/opt/homebrew/Library/Taps/dart-lang/homebrew-dart'...
error: RPC failed; curl 28 Failed to connect to github.com port 443 after 75001 ms: Couldn't connect to server
fatal: expected flush after ref listing
Error: Failure while executing; `git clone https://github.com/dart-lang/homebrew-dart /opt/homebrew/Library/Taps/dart-lang/homebrew-dart --origin=origin --template= --config core.fsmonitor=false` exited with 128.
➜ ~ brew -v
Homebrew 4.3.2
➜ ~ brew tap dart-lang/dart
so 解决方案是
--------begin-------
➜ 命令行执行 arch -arm64 brew install dart
➜ 命令行执行 brew install dart-sdk
---------done ------
下面是step运行结果
➜ homebrew git:(stable) arch -arm64 brew install dart
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/api/formula
#=#=#
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/api/cask.jw
Warning: No available formula with the name "dart". Did you mean dar or dirt?
==> Searching for similarly named formulae and casks...
==> Formulae
dart-sdk dartsim dar dirt
To install dart-sdk, run:
brew install dart-sdk
==> Casks
dat
To install dat, run:
brew install --cask dat
➜ homebrew git:(stable) brew install dart-sdk
==> Fetching dart-sdk
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/dart-sdk-3.
######################################################################### 100.0%
==> Pouring dart-sdk-3.4.1.arm64_sonoma.bottle.tar.gz
🍺 /opt/homebrew/Cellar/dart-sdk/3.4.1: 1,041 files, 603.4MB
==> Running `brew cleanup dart-sdk`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).