Domestic network environment what situation is not to say, Homebrew official tutorial is not suitable for national conditions.

Today, I have tried many methods, and now I write the simplest and direct method to you:

The first step is to copy and paste the following command directly:

/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"

Step 2: If the following error appears, the installation of step 1 is complete, and the clone of step 2 is stuck, execute the following three commands

cd "$(brew --repo)/Library/Taps/"

mkdir homebrew && cd homebrew

git clone git://mirrors.ustc.edu.cn/homebrew-core.git

Step 3: After cloning is complete, execute the installation command of step 1 again and go through the installation process again:

/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"

Step 4: Success!!

If ==> Installation successful! The installation is successful!