I performed a fresh install of macOS Mojave 10.14. Immediately after that I installed Xcode Version 10.0 (10A255) from the Mac App Store.
Now, I wish to install Homebrew which requires Xcode Command Line Tools to be installed. My understanding is that installing Xcode also installs the Command Line Tools. Or not?
As per this answer, I checked if the Command Line Tools are installed by running:
which printed the path for the Developer directory as follows:
As suggested in the answer, I also verified the return value by running:
I also ran,
make and bash was able to locate and execute them.
Thus far I am convinced that the Xcode Command Line Tools are installed. Now when I execute:
I get this alert:
What's the probable reason for this disparity? Will this install Xcode Command Line Tools twice? Or overwrite the existing installation?
As I understand, Xcode Command Line Tools can be installed without installing Xcode. Also, from my previous experience, if the Command Line Tools aren't installed separately from Xcode (by running
xcode-select --install), they are not detected by Homebrew, i.e. when running
brew config, the value for
CLT: is shown as
Here's the complete picture (pardon the pun):
Although I am talking in context of macOS Mojave, the question remains the same with regard to previous versions of macOS.
What is the advisable approach to take here?
Note: After installing Xcode, I launched it, accepted license agreement and let it finish its run of installing additional tools (which is a one time activity).