文章目录
参考
mac下镜像飞速安装Homebrew教程
Homebrew 安装包失败 & 切换源 & 安装缓慢
介绍
Homebrew是一款包管理工具,目前支持macOS和linux系统。主要有四个部分组成: brew、homebrew-core 、homebrew-cask、homebrew-bottles。
名称 | 说明 |
---|---|
brew | Homebrew源代码仓库 |
brew-core | Homebrew核心源 |
brew-cask | 提供macOS应用和大型二进制文件的安装 |
brew-bottles | 预编译二进制软件包 |
换源
此处将homebrew官方源替换为中科大源
# 替换brew源
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
# 替换homebrew-core源
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
# 替换homebrew-cask源
cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
# 替换homebrew-bottles源
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
安装目录 & 配置文件目录
安装目录/usr/local/Cellar
配置文件目录/usr/local/etc