前几天朋友给了个项目让我跑一下,一番操作把自己系统环境搞炸了,到现在还没有找到炸的原因,所有配置都还原成默认的,brew
源也变成默认github
的了。使用的中科大的brew源,清华源和阿里源试了下感觉并不是很理想。
操作
- 替换brew.git:
cd “$(brew --repo)”
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
- 替换homebrew-core.git:
cd “$(brew --repo)/Library/Taps/homebrew/homebrew-core”
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
- 替换homebrew-cask.git:
cd “$(brew --repo)”/Library/Taps/homebrew/homebrew-cask
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
最后 cd ~ && brew update