mac 下使用 brew install 命令時會比較慢,能夠經過設置 brew 鏡像爲國內源來解決(本文使用清華鏡像)。git
➜ cd "$(brew --repo)" ➜ git remote -v origin https://github.com/Homebrew/brew (fetch) origin https://github.com/Homebrew/brew (push) ➜ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
➜ cd "$(brew --repo homebrew/core)" ➜ git remote -v origin https://github.com/Homebrew/homebrew-core (fetch) origin https://github.com/Homebrew/homebrew-core (push) ➜ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
➜ brew update
參考:github