正在加载搜索索引…
没有最近搜索
没有结果 for "Query here"
cd $(brew --repo) && git remote -v
origin https://github.com/Homebrew/brew.git (fetch) origin https://github.com/Homebrew/brew.git (push)
cd $(brew --repo homebrew/core) && git remote -v
origin https://github.com/Homebrew/homebrew-core.git (fetch) origin https://github.com/Homebrew/homebrew-core.git (push)
git -C "$(brew --repo)" remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles
git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
完成更换源操作后,可执行以下命令验证源配置是否成功。
brew update
brew config | grep -E 'ORIGIN|BOTTLE'
通过 brew config 命令,你可以检查当前使用的仓库源和 Bottle 源。
brew config
如果报 homebrew/core 目录不存在,可使用以下命令检查。
homebrew/core
brew tap
如果没有输出 homebrew/core,可使用以下命令强制安装。
brew tap --force homebrew/core