How to solve the “invalid active developer path” Brew error after updating to Mac OS Catalina 10.15
Using Brew (Homebrew) and just recently updated to Mac OS Catalina 10.15? You might have encountered this warning:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

This error is alerting you of the fact that you need to upgrade/install your XCode command-line tools. You probably already did this operation the first time you installed Brew, but you need to repeat it. Simply run the following command
xcode-select --install
And you will trigger the necessary installation steps. At the end f the process, you will view a confirmation window like the following.

And that’s all!