show
top

brew update慢,brew install慢如何解决?

brew使用国内镜像源

# 步骤一
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
 
# 步骤二
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
 
#步骤三
brew update

注意这里需要等待一会,因为要更新资源。
更新完后使用 brew update,brew install速度变快很多了,不会卡在那半天没动静,替换镜像完成。

复原

cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git
 
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core
 
brew update
posted @ 2019-07-22 01:01  蓝波大人  阅读(325)  评论(0编辑  收藏  举报