mac pro 下 brew 設置國內鏡像

mac 下使用 brew install 命令時會比較慢,能夠經過設置 brew 鏡像爲國內源來解決(本文使用清華鏡像)。git

設置 homebrew

➜ 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

設置homebrew-core

➜ 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

相關文章
相關標籤/搜索