Just installed Homebrew in macOS 10.15 Catalina and running the command…
$ brew doctor
…suggests to update the macOS Command Line Tools with the message:
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 macOS Software Update in System Preferences doesn’t agree, because it says “Your Mac is up to date” – and you get the same result when checking the software update from the Terminal using softwareupdate --install -a
Then it’s time to re-install Command Line Tools!
Using:
$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install
This will remove the CLT & then launch the Install Command Line Developer Tools-wizard.
Follow it’s on screen instructions until the Command Line Tools have been reinstalled successfully.
Run $ brew doctor
again in order to confirm for the glorious «Your system is ready to brew.»
This doesn’t work for me. I follow those instructions and still get the warning.
@aldaron there are different causes for this error, depending also on the macOS version. Have a look at this Homebrew discussion with more tips that helped others to resolve this error: https://discourse.brew.sh/t/brew-doctor-warns-about-warning-a-newer-command-line-tools-release-is-available/6370
softwareupdate -i $(softwareupdate -l | awk ‘/\*\ Label: Command Line Tools/ { $1=$1;print }’ | sed ‘s/^[[ \t]]*//;s/[[ \t]]*$//;s/*//’ | cut -c 9-) –verbose
source: https://github.com/rtrouton/rtrouton_scripts/blob/master/rtrouton_scripts/install_xcode_command_line_tools/install_xcode_command_line_tools.sh
Thanks for sharing!