Homebrew鏡像源的配置


http://www.found5.com/view/190.html

 

 

替換及重置Homebrew默認源

替換及重置Homebrew默認源

替換brew.git:

    cd "$(brew --repo)"
    git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

替換homebrew-core.git:

    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

替換Homebrew Bottles源: 參考:替換Homebrew Bottles源

 

在中科大源失效或宕機時可以: 1. 使用清華源設置參考。 2. 切換回官方源:

重置brew.git:

    cd "$(brew --repo)"
    git remote set-url origin https://github.com/Homebrew/brew.git

重置homebrew-core.git:

    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

    git remote set-url origin https://github.com/Homebrew/homebrew-core.git

注釋掉bash配置文件里的有關Homebrew Bottles即可恢復官方源。 重啟bash或讓bash重讀配置文件。

查看brew已經安裝的軟件

    brew list

查看homebrew軟件安裝的位置(例如composer)

    brew list composer

本文來自投稿,不代表訪得立場,如若轉載,請注明出處:http://www.found5.com//view/190.htm

 


免責聲明!

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



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