Yefei.Blog

个人日记 WIKI

用户工具

站点工具


macos:brew

home brew 国内镜像

https://developer.aliyun.com/mirror/homebrew

#该镜像是 Homebrew 的 formula 索引的镜像 
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
 
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
 
# 如果没有这个目录 homebrew-core 可以直接 clone
git clone https://mirrors.aliyun.com/homebrew/homebrew-core.git "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
 
 
brew update
 
#该镜像是 Homebrew 二进制预编译包的镜像
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
 
# zsh
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
macos/brew.txt · 最后更改: 2020/03/18 10:23 由 yefei