在家用 brew 网络很不通畅,尝试了一下国内源,最后选了中科大的源。
直接按照下面命令替换即可。
# 替换 Homebrew
git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
# 替换 Homebrew Core
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
# 替换 Homebrew Cask
git -C "$(brew --repo homebrew/cask)" 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' >> ~/.bash_profile
source ~/.bash_profile
# 刷新下
brew update-reset
本文链接:https://razeen.cn/post/mac-brew-set-ustc-repo.html,参与评论 »
--EOF--
发表于 2021-08-29 08:36:00,并被添加「max os」标签。
本站使用「署名 4.0 国际」创作共享协议,转载请注明作者及原网址。更多说明 »
提醒:本文最后更新于 301 天前,文中所描述的信息可能已发生改变,请谨慎使用。
Comments