今早在 Mac 上搭建 Flink 环境的时候,在使用 brew 下载包的时候有卡住的情况发生,
解决方式:替换 brew 源
# 替换成阿里云的 brew.git 仓库地址:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 替换成阿里云的 homebrew-core.git 仓库地址:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# 如上替换完成后,执行brew更新操作
brew update
替换完成后执行 brew update 更新。
brew 更新完成后就可以了。现在再去执行我们之前卡住的命令。成功。