Too slow

➜ ~ brew install mysql-connector-c Updating Homebrew... ...Copy the code

9999 years later…

The blogs on the Internet, giving them to the fish, they’re too dead

Teach people to fish

1, visit tsinghua mirrors.tuna.tsinghua.edu.cn/ mirror station

2. Search brew

3. Complete the update as prompted

terminal

➜ ~ git - C "$(the brew - repo)" remote set - origin url 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 ➜ ~ the brew update ^ C % ➜ ~ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' > > ~ /. ZSHRC ➜ ~ source ~ /. ZSHRC ➜ ~ the 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) and 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... Forwarded Master to Origin/Master. Updated 1 TAP (Homebrew/Cask). ➜ ~Copy the code

Here’s the fish, catch it

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

Check the shell version
➜  ~ echo $SHELL
/bin/zsh

# Choose one of two: ZSH
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc

# Choose between two: bash
# echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
# source ~/.bash_profile

brew update
Copy the code