HomeBrew 环境配置以及卡顿问题处理
关键环境变量配置
推荐使用清华源镜像替换:
https://mirrors.ustc.edu.cn/
# 文件列表(对应以下镜像仓库地址)
homebrew Folder
-------------------------------
homebrew-bottles
homebrew-cask-versions.git
homebrew-cask.git
homebrew-core.git
环境变量替换配置项:
.bash_profile
或 .zshrc
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core.git"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles/bottles"
# close brew auto update (是否关闭自动更新,开发环境推荐设置为true,手动更新)
export HOMEBREW_NO_AUTO_UPDATE=true
软件镜像地址替换:
替换核心软件仓库
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/home