
使用国内Homebrew镜像加速
Homebrew在国内环境下是非常缓慢的。。。
使用国内的Homebrew镜像加速,安装软件再也不用等了。。。
安装brew
1
ruby -e"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
卸載Homebrew
1
2
curl -O https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh
bash uninstall.sh
1
2
3
4
5
6
7
8
9
# 替换brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/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
brew update
一些国内常用的Homebrew加速镜像地址
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 替换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
参考文章
https://www.noonme.com/post/2017/03/homebrew-speed-up/?vpslala.com https://segmentfault.com/a/1190000018520300?vpslala.com http://www.itucd.com/archives/1228?vpslala.com
💘 相关文章
- Mac 系统docker 设置国内镜像加速的方法
- 一款优雅强大的开源终端工具-Nushell ,在Mac,Linux系统下的安装以及Nushell的常用命令。
- 酸*酸*乳*2022最新協議服務端搭建以及在Mac平台下的應用方法
- 用过Mac Os 后你就再也不会用其它的操作系统了
- 关闭Mac系统下的App Store下载软件需输入密码的方法
- MySQL在Mac系統通過brew安裝以及重啟的方法
- mac系统安装web压力测试工具webbench以及webbench使用演示的记录
- mac os brew "shell-init: error retrieving current directory"的解决方法
- Mac os youtube-dl zsh: no matches found: solution
- Mac系统在本地构建可信任的https开发测试工具-mkcert