来源:清华大学开源软件镜像站(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

brew更换国内源的更多相关文章

  1. brew - 更换国内源

    brew如果不换成国内源,安装软件时候可能会出问题,不是安装不了就是速度很慢,所以使用它,更换国内游是比较好的选择! 我更换的是清华大学开源软件镜像站,打开shell窗口,依次执行下面命令: cd & ...

  2. brew 更换国内源(镜像)

    cd /usr/local git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew.git brew update ...

  3. Ubuntu18.04更换国内源(阿里,网易,中科大,清华等源)

    1.备份 备份/etc/apt/sources.list文件 mv /etc/apt/sources.list /etc/apt/sourses.list.backup 2.新建 新建/etc/apt ...

  4. pip/pip3更换国内源

    pip/pip3更换国内源 用途:pip更换为国内源,可以大大的提高安装成功率和速度. Windows更换pip/pip3源 打开目录:%appdata% 新增pip文件夹,新建pip.ini文件 给 ...

  5. Ubuntu18.04更换国内源

    Ubuntu18.04更换国内源 Ubuntu本身的源使用的是国内的源,下载速度比较慢,不像CentOS一样yum安装的时候对镜像站点进项选择, 所以选择了更换成国内的源. 以下内容整合自网络 备份/ ...

  6. yum更换国内源 yum下载rpm包 源码包安装

    7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装 yum更换国内源 cd  /etc/yum.repo.d/ 删除源 rm -f   dvd.repo rm -f  C ...

  7. yum更换国内源及yum下载rpm包

    一.yum更换国内源 运维开发技术交流群欢迎大家加入一起学习(QQ:722381733) 1.前往yum文件路径地址 [root@web1 ~]# cd /etc/yum.repos.d/ [root ...

  8. yum更换国内源、yum下载rpm包、源码包安装 使用介绍

    第5周第4次课(4月19日) 课程内容: 7.6 yum更换国内源7.7 yum下载rpm包7.8/7.9 源码包安装 7.6 yum更换国内源 当yum仓库的软件不好用时,例如很多yum源都是国外的 ...

  9. FreeBSD更换国内源(pkg源使用台湾源,中科大源备用)

    安装后第一件事就是更换国内源,不然后面安装桌面等,不用国内源下载太慢. 修改 pkg 源 创建用户级 pkg 源目录:mkdir -p /usr/local/etc/pkg/repos ee /usr ...

随机推荐

  1. 详解Redis中两种持久化机制RDB和AOF(面试常问,工作常用)

    redis是一个内存数据库,数据保存在内存中,但是我们都知道内存的数据变化是很快的,也容易发生丢失.幸好Redis还为我们提供了持久化的机制,分别是RDB(Redis DataBase)和AOF(Ap ...

  2. Redis的批量操作是什么?怎么实现的延时队列?以及订阅模式、LRU。

    前言 这次的内容是我自己为了总结Redis知识而扩充的,上一篇其实已经总结了几点知识了,但是Redis的强大,以及适用范围之广可不是单单一篇博文就能总结清的.所以这次准备继续总结,因为第一个问题,Re ...

  3. css3 知识点积累

    -moz-    兼容火狐浏览器-webkit-  兼容chrome 和safari1.角度  transform:rotate(30dge)  水平线与div 第四象限30度  transform: ...

  4. kubectl常用命令(个人记录)

    一.获取pod信息 1.获取当前集群运行的所有的pods的信息 kubectl get pod   2.获取当前集群运行的所有的pod运行在哪个节点 kubectl get pods -owide   ...

  5. kafka容器报内存不足异常(failed; error='Cannot allocate memory' (errno=12))

    一.启动kafka broker时异常 nohup /mnt/sata1/kafka_2.11-0.10.0.1/bin/kafka-server-start.sh /mnt/sata1/kafka_ ...

  6. Docker进行MySQL主从复制操作

    Docker的相关操作 与 Docker下MySQL容器的安装 https://www.cnblogs.com/yumq/p/14253360.html 本次实验我是在单机状态下进行mysql的主从复 ...

  7. [ABP教程]第七章 作者:数据库集成

    Web开发教程7 作者:数据库集成 关于此教程 在这个教程系列中,你将要构建一个基于ABP框架的应用程序 Acme.BookStore.这个应用程序被用于甘丽图书页面机器作者.它将用以下开发技术: E ...

  8. Let's Encrypt SSL证书申请

    当前环境: 阿里云CoreOS 所绑定的域名,解析管理也在阿里这儿,在该文档中使用 example.com 作为示例. Docker 镜像 acme.sh:2.8.8 nginx 申请证书并使用 使用 ...

  9. 索引失效 -- 使用Between范围查询时

    需求说明 产品需要统计一段时间范围内每月用户的注册人数(根据用户信息表中的创建时间),需要我通过SQL导出数据,但是数据量太大,导出需要20多秒,于是我尝试在创建时间字段中加索引,但是发现加了索引后索 ...

  10. 数据仓库组件:HBase集群环境搭建和应用案例

    本文源码:GitHub || GitEE 一.Hbase简介 1.基础描述 Hadoop原生的特点是解决大规模数据的离线批量处理场景,HDFS具备强大存储能力,但是并没有提供很强的数据查询机制.HBa ...