mac brew install 慢解决办法

说明

这个问题困扰了我很久,在网上找了很多资料。都是断章取义。没介绍完整,
都没有实际效果;最近需要在本地安装mysql。 为了安装快一点,
又重新面对brew install 慢的问题。又在网上把之前看的重新试一下。
终于解决了。下面的步骤,都是在本机上执行成功。brew install 慢的问题已经解决。
希望可以帮读者
感谢https://www.cnblogs.com/magexi/p/11664539.html的博主,在次基础上完成的

步骤

切换到 Homebrew 目录

cd "$(brew --repo)"
查看远程仓库 git remote -v.  默认的使用的github。
 删除远程: git remote rm origin 
添加阿里源 :git remote add origin https://mirrors.aliyun.com/homebrew/brew.git
切换成阿里源: git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git

替换 homebrew-core.git:

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
查看远程仓库 git remote -v.  默认的使用的github。
 删除远程: git remote rm origin 
添加阿里源 :git remote add origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
切换成阿里源: git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git

替换 homebrew-bottles: 二进制文件

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

替换 homebrew-cask.git: cask 表示 GUI 应用的源, 阿里云没有提供 cask 源, 故使用 USTC 源

cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
git remote rm origin 
git remite add origin https://mirrors.ustc.edu.cn/homebrew-cask.git
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容