Homebrew fails on MacOS Big Sur

I had the same problem. Try upgrading brew - this solved it for me.

brew upgrade

I have solved my problem reinstalling brew with this script (install.sh):

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Then:

brew --version

output:

Homebrew 3.0.1
Homebrew/homebrew-core (git revision 47e5d; last commit 2021-02-14)

Then just proceed with: xcode-select --install


You should update brew;

brew update-reset