Homebrew下载软件卡住慢更换国内镜像源

版权声明:文章版权归本博客所以未经许可不能转载 https://blog.csdn.net/u011738045/article/details/82422062

我这里更换的是清华镜像源当然还有很多其他镜像源你可以根据自己的网络情况来定

更换为清华源来加快速度。网址为:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew

清华镜像源官方网站:https://tuna.moe/

下面是详细的更换步骤

  

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

替换为中科大镜像

    替换HomeBrew默认源

cd "$(brew --repo)"
git remote set-url origin git://mirrors.ustc.edu.cn/brew.git

替换HomeBrew Bottles源

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

  brew update可能有点慢需要几分钟,这个根据自己的情况来定需要耐心的等待

其他完整文章: https://blog.csdn.net/eric_coding/article/details/53329073#brew-cask-%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4

https://www.jianshu.com/p/5f1efab5a40a

猜你喜欢

转载自blog.csdn.net/u011738045/article/details/82422062