MacOS 用清华镜像源取代 brew 官方源
MacOS 是类似linux系统,很多linux上的工具,通过 MacOS 上的 brew 安装。
但 brew默认的安装源,在中国大陆访问很慢,可以考虑换成清华大学的。
安装 brew
安装brew:curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_instal
大陆 brew 速度慢,更改脚本中的资源链接替换成清华大学的镜像,修改如下两句:
BREW_REPO = “https://github.com/Homebrew/brew“.freeze
CORE_TAP_REPO = “https://github.com/Homebrew/homebrew-core“.freeze
更改为:
BREW_REPO = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git".freeze
CORE_TAP_REPO = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git".freeze
运行脚本:/usr/bin/ruby brew_install
如果已经安装brew ,替换清华大学的镜像
$ cd "$(brew --repo)"
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
$ brew update
复原官方:
$ cd "$(brew --repo)"
$ git remote set-url origin https://github.com/Homebrew/brew.git
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://github.com/Homebrew/homebrew-core
$ brew update
本帖steem首发地址
MacOS 用清华镜像源取代 brew 官方源 | hive
最近新帖
- python3 安装 beem 最新版本 v23,开发 steem 机器人
- ubuntu无线wifi局域网ping不同,ssh也无法用的问题 steem | hive
- 通过steemauto/hive.vote维护升级看steem/hive对自动点赞的依赖 steem | hive
- steem的API节点速度总体上已经接近hive水平 steem | hive
- 清理docker的容器和数据卷存储 steem | hive
- steem/hive出现异常现象,建议资产转移到交易所 steem | hive
- steem软分叉HF22.8888恐导致安全隐患,建议资产转移到交易所 steem | hive
- 韩国社区要主导steem软分叉HF22.888?报复 hive 硬分叉的黑名单? steem | hive
- HIVE如果没有团队操盘,迟早会吃TRON孙操盘STEEM的亏 steem | hive
- 如何让Brave访问steem类网站更快? steem | hive