处理 homebrew 报错 “Error: Failed to download https://formulae.brew.sh/api/formula.jws.json!“

处理方式

export HOMEBREW_NO_INSTALL_FROM_API=1
brew update

⚠ 应急方式
使用国内镜像

中国科大镜像

export HOMEBREW_API_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles/api"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core.git"

直接 export 不生效的话, 写到 ~/.zshrc 里面去

posted @ 2025-07-01 14:19  盘思动  阅读(488)  评论(0)    收藏  举报