The main cause of slow access to resources, replacing the default source image on the line.
the use of domestic brew mirror source
USTC used here, in addition to the available Tsinghua
1
2
3
4
5
6
7
8
9
10
|
# 步骤一
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
|
It should be noted that wait for a while, because you want to update the resource.
After using the update brew update,brew install
rate becomes much faster, and it will not be stuck in a long time no movement, replace the mirror is complete.
recovery
1
2
3
4
5
6
7
|
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
|