After upgrading macOS or after installing XCode you might bet a warning from Brew when executing
brew doctor telling you that there is a new Command Line Tools release available:
Warning: A newer Command Line Tools release is available. Update them from Software Update in System Preferences or https://developer.apple.com/download/more/
But probably you already have the latest version so let’s try to get his fix.
So far I’ve found two solutions that worked fine to me twice.
Solution 1: Re-install Command Line Tools from the CLI
sudo rm -rf /Library/Developer/CommandLineTools xcode-select --install
Solution 2: Re-install Command Line Tools from the Apple website
Download the latest version from here and install it manually opening the downloaded file.