When using the brew install command to install commands such as apt-get or yum, the following error will be reported:
Solution:
rm -rf /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core;
brew update
Just execute the download command after the update: