“This is the first day of my participation in the Gwen Challenge in November. Check out the details: The last Gwen Challenge in 2021”
Brew updates for MAC are slow because of the following reasons: github.com/
In order to update and download more efficiently, we changed the BREW source to domestic (Ali or USTC) source.
The code is as follows: record, convenient later modify.
View brew source:
Check brew.git's current source CD"$(brew --repo)"&& git remote -v # check homebrew-core's current source CD"$(brew --repo homebrew/core)"&& git remote -v # check homebrew-cask's current source CD"$(brew --repo homebrew/cask)" && git remote -v
Copy the code
Substitute ali source
# change brew. Git to $git-c"$(brew --repo)" remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git# change homebrew-core-. git to $git-c"$(brew --repo homebrew/core)" remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git# change homebrew-cask. Git to $git-c"$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-cask.git# ZSH replaces brew Bintray image $echo'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles'>> ~/.zshrc $source ~/.zshrc # bash replaces brew Bintray image $echo'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles'>> ~/.bash_profile $source ~/.bash_profile # Brew updateCopy the code
Replace with uSTC source
# change brew. Git to $git-c"$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git# change homebrew-core-. git to $git-c"$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git# change homebrew-cask. Git to $git-c"$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git# ZSH replaces brew Bintray image $echo'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles'> > ~/.zshrc $ source ~/.zshrc # bash replaces brew Bintray image $echo'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles'>> ~/.bash_profile $source ~/.bash_profile # Brew updateCopy the code
Replace with the official source
# change brew. Git to $git-c"$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git# change homebrew-core-. git to $git-c"$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git# change homebrew-cask. Git to $git-c"$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git# ZSH replaces brew Bintray image $echo'export HOMEBREW_BOTTLE_DOMAIN=https://github.com/Homebrew/homebrew-bottles'> > ~/.zshrc $ source ~/.zshrc # bash replaces brew Bintray image $echo'export HOMEBREW_BOTTLE_DOMAIN=https://github.com/Homebrew/homebrew-bottles'>> ~/.bash_profile $source ~/.bash_profile # Brew updateCopy the code