来源:清华大学开源软件镜像站(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. spark集群运行模式

    spark的集中运行模式 Local .Standalone.Yarn 关闭防火墙:systemctl stop firewalld.service 重启网络服务:systemctl restart ...

  2. ThreadLocal解决什么问题

    原创文章,转载请务必将下面这段话置于文章开头处(保留超链接).本文转发自技术世界,原文链接 http://www.jasongj.com/java/threadlocal/ ThreadLocal解决 ...

  3. [剑指 Offer 11. 旋转数组的最小数字]

    [剑指 Offer 11. 旋转数组的最小数字] 把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转.输入一个递增排序的数组的一个旋转,输出旋转数组的最小元素.例如,数组 [3,4,5, ...

  4. INNER JOIN、LEFT JOIN、RIGHT JOIN、FULL JOIN 的使用和区别

    INNER JOIN:如果表中有至少一个匹配,则返回行 LEFT JOIN:即使右表中没有匹配,也从左表返回所有的行 RIGHT JOIN:即使左表中没有匹配,也从右表返回所有的行 FULL JOIN ...

  5. 推荐系统实践 0x13 Word2Vec

    Word2Vec是谷歌团队提出的,让词向量在自然语言处理当中再度流行,并且推广到了广告.搜索.推荐等各个领域当中.Word2Vec顾名思义,就是一个生成对词的向量表达的模型.假设我们使用一组句子组成的 ...

  6. 看图知义,Winform开发的技术特点分析

    整理一下自己之前的Winform开发要点,以图文的方式展示一些关键性的技术特点,总结一下. 1.主体界面布局 2.权限管理系统 3.工作流模块 4.字典管理 5.通用的附件管理模块 6.系统模块化开发 ...

  7. js概念和ECMAScript

    概念 ​ ​就是一门浏览器客户端的脚本语言 运行在客户端浏览器中的,每一个浏览器都有JavaScript的解析引擎. 脚本语言,不需要编译,直接就可以被浏览器解析执行. 好处: ​ 可以增强一些用户的 ...

  8. 使用Lists.partition切分性能优化

    项目实战 影拓邦电影同步中,使用Lists.partition按500条长度进行切分,来实现es的同步. 切分的List为 使用介绍及示例 将list集合按指定长度进行切分,返回新的List<L ...

  9. Lagom 官方文档之随手记

    引言 Lagom是出品Akka的Lightbend公司推出的一个微服务框架,目前最新版本为1.6.2.Lagom一词出自瑞典语,意为"适量". https://www.lagomf ...

  10. 使用Pr压缩视频,增大音量

    视屏压缩(亲测有效教程):https://www.zhihu.com/question/67762625 音量增大(亲测有效教程):https://jingyan.baidu.com/article/ ...