Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 913 Bytes

mac.md

File metadata and controls

37 lines (30 loc) · 913 Bytes

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

替换homebrew-bottles

echo $SHELL # 看输出结果是/bin/zsh还是/bin/bash

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

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

关闭brew每次执行命令时的自动更新

export HOMEBREW_NO_AUTO_UPDATE=true
brew search go
brew info go
brew install [email protected]
brew services start [email protected]

aliyun mirror