huxiuchang

解决 Homebrew 下载更新极慢的问题

2020-09-23 / 知识 / none / 次围观 / 快抢沙发

问题定位

使用brew update --verbose观察 update 过程:

brew update --verbose
Checking if we need to fetch /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Fetching /usr/local/Homebrew...
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...

发现 update 卡在仓库获取文件的过程

更换 Homebrew 源

# 替换 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

# 替换 homebrew-bottles:
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自锅巴菜,原文地址《解决 Homebrew 下载更新极慢的问题
上一篇: curl简单终端返回结果命令 下一篇:

> 添加新评论

Copyright © 锅巴菜 津ICP备15001834号-1