brew

brew

简介

操作

  • 安装指定版本
1
2
3
$ git clone http://github.com/homebrew/homebrew-core
$ vi homebrew-core/Formula/xxxx.rb
$ brew install homebrew-core/Formula/xxxx.rb

更换Homebrew源

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 替换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 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
# 替换homebrew-cask.git:
cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
updatedupdated2024-08-252024-08-25