I'm trying to install Homebrew on macOS Mojave 10.14.6. To do this, I'm running the command line suggested at the Homebrew website:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Although my computer already has Xcode installed (updated to version 11 a few days ago, according to the version history), the Homebrew installer doesn't seem to be aware of this. Instead, it tries (and fails) to perform a fresh installation of the Command Line Tools.

Here's the output I get in the Terminal window:

==> This script will install:
==> The Xcode Command Line Tools will be installed.

Press RETURN to continue or any other key to abort
==> Searching online for the Command Line Tools
==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
Timed out while loading data from the Apple Software Update server.
==> Installing the Command Line Tools (expect a GUI popup):
==> /usr/bin/sudo /usr/bin/xcode-select --install
xcode-select: note: install requested for command line developer tools
Press any key when the installation has completed.

At this point, the computer displays a dialog box asking me to either (a) install XCode or (b) visit the XCode page in the App Store. Neither of these options does anything useful. (I either get to see a progress bar doing nothing for 5 minutes, or the App Store opens and confirms that, yes, XCode has indeed been installed.)

Is this a temporary issue caused by the version 11 update of XCode? Can anyone suggest a solution or workaround?


2 Answers 2


Xcode command line tools is a separate package for Xcode

Download Command Line Tools for Xcode from developer.apple.com/download/more and install it again.

source: Installing Xcode Command Line Tools

Useful for troubleshooting

xcode-select -p
  • Easier to type in, perhaps, but this is the command that the Homebrew installer is running of its own accord. It has the correct path for sudo; it's just trying to install something that's already there from a source that apparently doesn't exist. (This is where I get the progress bar showing no progress.)
    – r3mainer
    Sep 22, 2019 at 23:13
  • What does brew config output? (assuming the install got you that far) from @ankii's link look for a pkg file that looks like macOS_SDK_headers_for_macOS* and run open on it, like open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg from @Forcetti apple.stackexchange.com/questions/337744/… looks like the most common solution is to download Command_Line_Tools_for_Xcode from developer.apple.com/download/more
    – wrothe
    Sep 22, 2019 at 23:37
  • 2
    Something else useful is output from xcode-select -p and where you think your Xcode resides.
    – wrothe
    Sep 22, 2019 at 23:40
  • Homebrew hasn't been installed at all, so the output for brew config is, unsurprisingly, -bash: brew: command not found. For xcode-select -p, I get /Applications/Xcode.app/Contents/Developer.
    – r3mainer
    Sep 23, 2019 at 0:05
  • 2
    I think the easiest route is to download Command Line Tools for Xcode from developer.apple.com/download/more and install it.
    – wrothe
    Sep 23, 2019 at 0:28

As a side answer, It’s common for there to be a slight delay when new releases are out due to traffic or Apple taking 12 to 36 hours to seed all the download servers with a new package. Waiting a short term and retrying often works.

/usr/bin/sudo /usr/bin/xcode-select --install

Then install button in the window

choose install in this dialog to install the command line tools without needing Xcode

An internet connection is needed and the tools will update like other system updates. You don’t need the Mac App Store or developer downloads for this to work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .