I tried to install the command line tools on Mavericks following the steps in this very useful post
> xcode-select --install
but after a
Try to install the command line tools following Error Message "Xcode alone is not sufficient on Sierra"
brew seems checks if the command line tools installed in this path:
/Library/Developer/CommandLineTools My case is: I tried to install brew on my new mac. After I installed Xcode, there was nothing in the above path but the command line tools were somehow installed to another location. (xcode-select -p tell me it was /Applications/Xcode.app/Contents/Developer) The way in stackoverflow can install the command line tools to
/Library/Developer/CommandLineTools Now I got brew working. But I am not sure if it is the best solution as there should be two copies of command line tools on my machine using this method.
Install them from here. You must be a registered developer.
Other solution is: in xcode click Xcode>Open Developer Tool>More Developer Tools
This should then take you to a link which will require a developer Apple ID sign in. From there, you'll be redirected after authenticating to https://developer.apple.com/download/more/ where you can manually download and install the Command Line Tools.