homebrew 国内镜像的选择(阿里云、腾讯云、中科大)
起因是用 homebrew 官方源安装 imagemagick 提示 mismatch sha256sum,然后就进入漫长的下载源码包编译的过程,大概半个小时过去了仍然没有装好。
第二天,便想起阿里云、腾讯云都有 homebrew 的国内镜像源,再加上中科大的镜像源,都尝试了遍。
阿里云 homebrew
配置方法:[https://developer.aliyun.com/mirror/homebrew]。
# 替换brew.git:
cd "$(brew --repo)"
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 set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# 应用生效
brew update
# 替换homebrew-bottles:
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
腾讯云 homebrew
配置方法:Homebrew 镜像使用帮助 [https://mirrors.cloud.tencent.com/help/homebrew.html]。
cd "$(brew --repo)"
git remote set-url origin http://mirrors.cloud.tencent.com/git/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin http://mirrors.cloud.tencent.com/git/homebrew/homebrew-core.git
brew update
配置方法:Homebrew-bottles 镜像使用帮助 [https://mirrors.cloud.tencent.com/help/homebrew-bottles.html]。
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.cloud.tencent.com/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
中科大 homebrew
配置方法:Homebrew 源使用帮助[http://mirrors.ustc.edu.cn/help/brew.git.html]。
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
配置方法:Homebrew Core 源使用帮助[http://mirrors.ustc.edu.cn/help/homebrew-core.git.html]。
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
配置方法:Homebrew Bottles 源使用帮助[http://mirrors.ustc.edu.cn/help/homebrew-bottles.html]。
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
使用比较
使用阿里云或者腾讯云的 homebrew 镜像源安装 imagemagick,有的包下载提示404了。中科大源没有报错,就是下载速度比较慢,大概100多k每秒的速度。
最终选择中科大[USTC] homebrew 镜像源。
本文来自博客园,作者:imzhi,转载请注明原文链接:https://www.cnblogs.com/imzhi/p/homebrew-mirror-choose.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)