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