macOS安装Homebrew记录

封面

我是先装了个oh-my-zsh然后进行操作的,安装步骤参考上一篇文章,和Linux下的安装过程可以说是几乎一模一样。

先换源:添加环境变量

1
2
3
4
5
export HOMEBREW_INSTALL_FROM_API=1
export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"

然后通过清华源进行安装:

1
2
git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git brew-install
./brew-install/install.sh

然后brew-install文件夹可以删除了,用不上了。

后续如果要用清华源来下载的话,把上面的环境变量添加到.zshrc里就行了。


macOS安装Homebrew记录
http://blog.coolenoch.ink/2024/06/11/15macOS安装Homebrew记录-240611/
作者
CoolestEnoch
发布于
2024年6月11日
许可协议