• homebrew更新源


    brew 安装软件比较方便,国内源下载会比较快,但是有时下载会失败

    所有有时需要切换国内与默认的源

    切换国内源

    # 替换brew.git:
    $ cd "$(brew --repo)"
    # 中国科大:
    $ git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
    # 清华大学:
    $ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/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
    # 清华大学:
    $ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
    
    # 替换homebrew-bottles:
    # 中国科大:
    $ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
    $ source ~/.bash_profile
    # 清华大学:
    $ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
    $ source ~/.bash_profile
    
    # 应用生效:
    $ brew update

    切换到官方默认

    # 重置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_profile 中把带有homebrew的配置项注释后尝试

  • 相关阅读:
    SQL2005的CTE
    分列顯示
    2005数据库结构显示
    十进制/十八进制的互转换(此方法应用于所有进制与10进制的转换)
    2005自动生成数据库的清空脚本
    阻塞分析
    通过在 Web 表单中维持对象的 ViewState (视图状态)
    cs文件调用aspx页面js函数
    Repeater绑定后格式化某字段
    Fireworks中制作炫光效果
  • 原文地址:https://www.cnblogs.com/a531248552/p/13344177.html
Copyright © 2020-2023  润新知