教程-MAC下飛速安裝Homebrew
Step0.進(jìn)入終端
cmd+n
Step1.輸入以下代碼
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
Step2.中止當(dāng)前進(jìn)程或按Enter
Step3.輸入以下代碼
cd "$(brew --repo)/Library/Taps/"
mkdir homebrew && cd homebrew
git clone git://mirrors.ustc.edu.cn/homebrew-core.git
Step4.會發(fā)現(xiàn)在以下界面卡住
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
Esc香嗓,關(guān)閉終端
Step5.再次進(jìn)入終端
cmd+n
Step6.進(jìn)入下面的 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柬脸。
安裝完畢