太慢了
➜ ~ brew install mysql-connector-c
Updating Homebrew...
……
9999 years later……
网上的博客,直接给鱼,都太死了
授人予渔
1、访问清华镜像站 mirrors.tuna.tsinghua.edu.cn/
2、搜索brew
3、按照提示完成更新
terminal
➜ ~ git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
➜ ~ git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
➜ ~ git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
➜ ~ brew update
^C% ➜ ~ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.zshrc
➜ ~ source ~/.zshrc
➜ ~ brew update --verbose
Checking if we need to fetch /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/heroku/homebrew-brew...
Fetching /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
remote: Counting objects: 201516, done.
remote: Compressing objects: 100% (60621/60621), done.
remote: Total 201516 (delta 150550), reused 191510 (delta 140733)
Receiving objects: 100% (201516/201516), 94.53 MiB | 3.44 MiB/s, done.
Resolving deltas: 100% (150550/150550), completed with 5933 local objects.
From https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask
b3f5568669..5bfefd9b77 master -> origin/master
* [new tag] backup/react-native-debugger-16-17-11 -> backup/react-native-debugger-16-17-11
Updating /usr/local/Homebrew...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Switched to and reset branch 'master'
Your branch is up to date with 'origin/master'.
Switched to and reset branch 'stable'
Current branch stable is up to date.
Updating /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
First, rewinding head to replay your work on top of it...
Fast-forwarded master to origin/master.
Updated 1 tap (homebrew/cask).
➜ ~
鱼在这里,抓于2019-12-23
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
# 查看shell版本
➜ ~ echo $SHELL
/bin/zsh
# 二选一:zsh
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
# 二选一:bash
# echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
# source ~/.bash_profile
brew update