macOS brew install 404:Bottle missing, falling back to the default domain错误的修复

我用的是中科大的源,在安装brew install ffmpeg过程中下载依赖的时候频繁提示404,falling back to the default domain...,然后在依赖开始安装过程中又提示Bottle missing,找不到安装文件。手动brew install缺失的依赖可以继续,但是连续若干次之后我就觉得不对了。
于是找了几个方法,我使用的是第一种,其它方法供参考:

1. 更新镜像源

临时:

export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"
brew update

永久
zsh用户:

echo 'export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"' >> ~/.zshrc
source ~/.zshrc

bash用户:

echo 'export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"' >> ~/.bashrc
source ~/.bashrc

2. 更新bottle源

~/.zshrc或者~/.bashrc中的

export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles

改为

export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/bottles

然后source ~/.zshrc或者source ~/.bashrc

3. 更换为默认的镜像源

unset HOMEBREW_BREW_GIT_REMOTE
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew
  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值