問題描述
安裝的homebrew的時候下載速度超級慢,解決辦法是更換homebrew的下載源
操作步驟
1.用safari打開“
https://raw.githubusercontent.com/Homebrew/install/master/install.sh”,把里面的文本復制下來,在桌面創建文本文件“brew_install”,粘貼.
2.搜索:
BREW_REPO="https://github.com/Homebrew/brew"
替換成:
BREW_REPO="https://mirrors.ustc.edu.cn/brew.git"
保存.
3.打開terminal,運行命令:/bin/bash + 剛才的brew_install文件,比如:
/bin/bash /Users/admin/Desktop/brew_install

.把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
PS:如果有報錯:curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused,可以通過這個命令解決:sudo gem install redis
作者:小八子的開發之路
鏈接:https://www.jianshu.com/p/fdf7e316f096
來源:簡書
著作權歸作者所有。商業轉載請聯系作者獲得授權,非商業轉載請注明出處。