Homebrew是Mac的軟件包管理器,我們可以通過它安裝大多數開源軟件。但是在使用brew update更新的時候竟然要等待很久。猜測可能是因為brew的官方源被牆或或者響應慢。於是想到的切換Homebrew的更新源的辦法, 如果coding.net的源還是很慢的話, 也可以嘗試其他的源。具體代碼如下
$ #cd to homebrew foler $ cd "$(brew --repo)"; $ #check git remote status $ git remote -v; https://github.com/Homebrew/homebrew.git $ #update remote url with Coding.net $ git remote set-url origin https://git.coding.net/homebrew/homebrew.git $ brew update
brew鏡像源
- 中科大brew鏡像源 http://mirrors.ustc.edu.cn/homebrew.git
- 清華brew鏡像源 http://mirrors.ustc.edu.cn/homebrew.git