zoukankan      html  css  js  c++  java
  • brew更换国内源

    来源:清华大学开源软件镜像站(https://mirror.tuna.tsinghua.edu.cn/help/homebrew/)

    替换现有上游

     1 # brew 程序本身,Homebrew/Linuxbrew 相同
     2 git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
     3 
     4 # 以下针对 mac OS 系统上的 Homebrew
     5 git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
     6 git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
     7 git -C "$(brew --repo homebrew/cask-fonts)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-fonts.git
     8 git -C "$(brew --repo homebrew/cask-drivers)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-drivers.git
     9 
    10 # 以下针对 Linux 系统上的 Linuxbrew
    11 git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/linuxbrew-core.git
    12 
    13 # 更换后测试工作是否正常
    14 brew update

    复原

    (感谢Snowonion Lee提供说明)

    # brew 程序本身,Homebrew/Linuxbrew 相同
    git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
    
    # 以下针对 mac OS 系统上的 Homebrew
    git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git
    git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git
    git -C "$(brew --repo homebrew/cask-fonts)" remote set-url origin https://github.com/Homebrew/homebrew-cask-fonts.git
    git -C "$(brew --repo homebrew/cask-drivers)" remote set-url origin https://github.com/Homebrew/homebrew-cask-drivers.git
    
    # 以下针对 Linux 系统上的 Linuxbrew
    git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/linuxbrew-core.git
    
    # 更换后测试工作是否正常
    brew update
  • 相关阅读:
    Maven 在pom.xml的build中配置resources,来防止我们资源导出失败的问题
    JavaWeb
    MySQL
    JavaScript
    Caused by: org.apache.ibatis.exceptions.PersistenceExceptiong 更新IDEA后报错
    Loading class `com.mysql.jdbc.Driver‘. This is deprecated.警告处理,jdbc更新处
    mybatis+oracle添加数据时如果数据存在就更新,如果不存在就插入
    条件查询器Wrapper
    查询和删除
    时间和悲观锁
  • 原文地址:https://www.cnblogs.com/0day-li/p/13431558.html
Copyright © 2011-2022 走看看