修改Brew源
替换 brew源
我们用brew命令安装软件时,经常会遇到这样的情况:brew install xxxx 一直卡在Updating Homebrew....
只要我们进行替换就可以解决这个问题。
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
几个镜像:
- https://git.coding.net/homebrew/homebrew.git - Coding
- https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git - 清华
- https://mirrors.ustc.edu.cn/brew.git - 中科大
重置 brew源
如果你想重置brew源,那么切换为原来的下载地址就可以了。
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 876208453@qq.com
文章标题:修改Brew源
本文作者:Cai Jun
发布时间:2019-07-06, 12:51:03
最后更新:2019-07-16, 12:09:06
原始链接:http://johncaijun.github.io/2019-07-07-修改Brew源/版权声明: "署名-非商用-相同方式共享 4.0" 转载请保留原文链接及作者。