教程-MAC下飞速安装Homebrew
Step0.进入终端
cmd+n
Step1.输入以下代码
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
Step2.中止当前进程或按Enter
Step3.输入以下代码
cd "$(brew --repo)/Library/Taps/"
mkdir homebrew && cd homebrew
git clone git://mirrors.ustc.edu.cn/homebrew-core.git
Step4.会发现在以下界面卡住
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
Esc,关闭终端
Step5.再次进入终端
cmd+n
Step6.进入下面的 Taps 目录,clone homebrew-core,输入以下代码
cd /usr/local/Homebrew/Library/Taps/homebrew
git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
Step7.把homebrew repo切换为清华镜像
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
brew update
8.等待,终端会显示Already up-to-date。
安装完毕