Background: brew is a software management package tool for Mac. Needless to say, it is important and convenient. I found a lot of tutorials and reported errors. Later, I found a minimalist fool mode and shared it with everyone.
Execute the following command and follow the prompts all the way to the end.
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
The above steps can complete the installation of brew, hoping to help you avoid detours.