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

处理方式

export HOMEBREW_NO_INSTALL_FROM_API=1

brew update

参考文章

MacOS配置homebrew

⚠ 应急方式

使用国内镜像

# 中国科大镜像
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 里面去

你可能感兴趣的:(iOS,&,macOS,工具,homebrew,brew,报错,failed,formula)