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