homebrew换源
时间: 2023-11-07 21:05:59 浏览: 88
Homebrew 安装与配置 || 换源、卸载、常用命令、brew cask
好的,关于homebrew换源,你可以按照以下步骤进行操作:
1. 首先备份原有的brew源:
```
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git
```
2. 替换为清华大学的源:
```
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
```
3. 更新brew并重置homebrew-core:
```
brew update
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
```
4. 最后再次更新brew即可。
```
brew update
```
阅读全文