zoukankan      html  css  js  c++  java
  • 更换 homebrew 国内镜像源

    Brew 是OS X 上类似apt-get以及yum的一个软件包管理器,它依托于Github………………

    所以,虽然你侥幸下载到了 brew,但你肯定是无法更新 brew 的。原因你懂。不过虽然不能更新 brew,但这只是指brew这个管理器本身罢了,软件还是可以安装的。但由于无法使用 brew update 也就无法更新软件……我们有必要来给 brew 换源。

    安装、卸载homebrew

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
    sudo rm -rf /usr/local/

    替换homebrew默认源

    cd /usr/local
    git remote set-url origin git://mirrors.ustc.edu.cn/brew.git

    替换homebrew-core默认源

    cd /usr/local/Library/Taps/homebrew/homebrew-core
    git remote set-url origin git://mirrors.ustc.edu.cn/homebrew-core.git

    替换homebrew-cask默认源

    cd /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask
    git remote set-url origin git://mirrors.ustc.edu.cn/homebrew-cask.git

    替换homebrew bottles默认源

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

    PS:

    https://servers.ustclug.org/2016/01/mirrors-add-homebrew-bottles-source/

    https://www.logcg.com/archives/1301.html

    https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/

    https://mirrors.tuna.tsinghua.edu.cn/help/homebrew-bottles/

    https://lug.ustc.edu.cn/wiki/mirrors/help/homebrew-bottles

  • 相关阅读:
    BZOJ3781 小B的询问
    BZOJ3757 苹果树
    BZOJ1491 [NOI2007]社交网络
    BZOJ3754 Tree之最小方差树
    BZOJ1251 序列终结者
    BZOJ2259 [Oibh]新型计算机
    BZOJ1043 [HAOI2008]下落的圆盘
    D. 预定义变量
    A. 变量命名原则
    B. PHP变量的特点
  • 原文地址:https://www.cnblogs.com/phpdragon/p/5637954.html
Copyright © 2011-2022 走看看