Mac Homebrew install 慢的解决方法
brew install 会先去执行 brew update
而 brew update,会依次更新 : brew / homebrew-core / homebrew-cask
而以上三个的来源都在 github,国内 github 的连接极不稳定,国此速度才会很慢
一直卡在更新这里不动

#1 解决方法
建立本地境象的方法:
cd ~/Documents
mkdir repository
cd repository
git clone --mirror https://github.com/Homebrew/brew.git
git clone --mirror https://github.com/Homebrew/homebrew-core.git
git clone --mirror https://github.com/Homebrew/homebrew-cask.git
cd /usr/local/Homebrew/
git remote set-url origin ~/Documents/repository/brew.git
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
git remote set-url origin ~/Documents/repository/homebrew-core.git
cd /usr/local/Homebrew/Library/Taps/homebrew/
mkdir homebrew-cask
cd homebrew-cask
git remote set-url origin ~/Documents/repository/homebrew-cask.git

一下子就快了很多
本文介绍了一种通过创建本地镜像来加速Mac上Homebrew安装的方法,解决了因GitHub连接不稳定导致的brew install缓慢问题。
6469

被折叠的 条评论
为什么被折叠?



