Mac/Homebrew brew update慢的方法


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM