安装
1 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
安装缓慢问题
- 替换homebrew.git
1
2cd $(brew --repo)
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git - 替换homebrew-core.git
1
2cd $(brew --repo)/Library/Taps/homebrew/homebrew-core
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git - 查看shell配置文件,根据配置文件修改步骤4|5
1
echo $SHELL
- /bin/zsh替换homebrew-bottles
1
2echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc - /bin/bash替换homebrew-bottles
1
2echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
恢复默认配置
1 | // step1: |