Last active
January 2, 2020 03:31
-
-
Save july-12/d51720a312c789057830f9010c23dc6a to your computer and use it in GitHub Desktop.
替换homebrew镜像源
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
当我们brew update或者brew install xxx时,异常的慢,本事原因还是国内网络环境github下载慢导致。 | |
我们可以更换Homebrew源, 从https://mirrors.ustc.edu.cn/上搜索各对应的源 | |
cd "$(brew --repo)" (正常放置在/usr/local/Homebrew) | |
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git/ | |
# 替换homebrew-core | |
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" | |
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git/ | |
# 替换homebrew-cask | |
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask" | |
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git/ | |
# 替换homebrew-bottles: | |
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment