zoukankan      html  css  js  c++  java
  • HomeBrew 使用国内数据源

    使用中科大源

    1、替换默认源

    替换USTC镜像:

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

    重置为官方地址:

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

    2、替换homebrew-core.git

    替换 USTC 镜像:

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

    重置为官方地址:

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

    brew update

    3、替换Homebrew Bottles源

    请在运行 brew 前设置环境变量 HOMEBREW_BOTTLE_DOMAIN ,值为 https://mirrors.ustc.edu.cn/homebrew-bottles

    对于 bash 用户:

    echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
    source ~/.bash_profile
    

    对于 zsh 用户:

    echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
    source ~/.zshrc
    

    4、替换 Homebrew Cask 源

    替换为 USTC 镜像:

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

    重置为官方地址:

    cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
    git remote set-url origin https://github.com/Homebrew/homebrew-cask
    
  • 相关阅读:
    【转】Windows Phone的应用程序认证要求
    ObservableCollection删除问题
    国庆总结?
    .net dll破解实战
    理理头绪
    创建Metro风格的WPF界面
    Alpha项目测试
    原型设计
    团队项目总结
    最常用的35中心里效应
  • 原文地址:https://www.cnblogs.com/dowhile/p/HomeBrew-shi-yong-guo-nei-shu-ju-yuan.html
Copyright © 2011-2022 走看看