Homebrew 源更新;更換為國內源;


最近使用brew update時,發現homebrew更新緩慢;於是進行更換為國內源;

晚上這種教程很多,我選擇的是中科大的源;當然清華的源也是可以的,這取決於你當前所處的地理位置,這樣有更通暢的網絡鏈接;

https://mirrors.ustc.edu.cn/help/brew.git.html

https://mirrors.ustc.edu.cn/help/homebrew-core.git.html

https://mirrors.ustc.edu.cn/help/homebrew-cask.git.html

https://mirrors.ustc.edu.cn/help/homebrew-bottles.html(可選)

臨時配置bottles下載源:

export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles # 如果需要持久化,可以配置在.bashrc之中;

上面鏈接中,教程比較完善;大家可以參考配置;

如果你發現,使用更新的源之后,還是有些文件下載得很慢的話,可以嘗試使用其他工具進行下載,再放置到cache目錄中即可;注意目錄中的命令規則要符合原來的要求;

Homebrew stores downloaded files in either ~/Library/Caches/Homebrew or /Library/Caches/Homebrew (the former if it exists and the latter if the former doesn't). If you've already used Homebrew, check those locations and see which one exists, and drop the tar file you downloaded in that directory.

具體可參考如下文章:

https://stackoverflow.com/questions/23273637/how-to-find-where-homebrew-temporarily-saves-dependencies-being-downloaded

保持更新,轉載請注明出處;更多內容請關注 cnblogs.com/xuyaowen;


免責聲明!

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



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