brew: Can't find Xcode Command Line Tools

  • are reporting a bug others will be able to reproduce and not asking a question. If you’re not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • ran a brew command and reproduced the problem with multiple formulae? If it’s a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it’s a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it’s a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue?

Sometimes I get this message when brew upgradeing formulae.

The bottle needs the Xcode CLT to be installed.

That’s weird because I’m running Xcode 10 on MacOS Mojave and CLT are installed. I found instructions for installing Xcode CLT so I tried that.

$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

I’m not sure what it means by “Software Update”. I definitely have the latest release of Xcode 10.

Xcode is convinced that CLT is installed.

brew config can find some of the tools like clang and git but not CLT.

$ brew config
HOMEBREW_VERSION: 1.7.6-24-gac801d4
ORIGIN: https://github.com/Homebrew/brew
HEAD: ac801d4d634e0dadb59695638b508f7249f5f4d5
Last commit: 6 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 1f874c6d5acfd2ae635a25d68eae0a855ed157fc
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_GITHUB_API_TOKEN: set
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: 10.0 build 1000
Git: 2.17.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_25, 1.6.0_65-b14-468
macOS: 10.14-x86_64
CLT: N/A
Xcode: 10.0
XQuartz: 2.7.11 => /opt/X11

brew doctor told me that I should update CLT from the App Store. It also warned me about unbrewed headers and libraries but I don’t think that’s relevant.

Warning: A newer Command Line Tools release is available.
Update them from Software Update in the App Store.

There aren’t any updates available in the App Store because I have the latest!

Any ideas?


I originally posted this in the Homebrew community discussion but @SMillerDev said it’s a bug and that I should report it so here I am!

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Sorry, I didn’t mean to imply anything, just wanted my testing results to be clear. I am sure this is well thought out and there is good reason for everything. Since HB can’t use the Xcode CLT could you please point me to what is different between Xcode CLT and standalone CLT? I could find nothing on that subject. For me, everything worked fine with no CLT in /library/developer. Thank you.

PS. I wrote and maintain the Freeswitch macOS wiki pages and I would like to add info regarding this to minimize confusion for others with Xcode installed.

Exact problem here. Latest Homebrew, Xcode 9 on 10.13 and Xcode 10 on 10.14, in both cases Xcode-select shows CLT, etc installed. If Homebrew is installed into from scratch HB will insist on downloading the CLT. Test: I removed the HB installed CLT from /library/developer then: IF- HB is already installed and update/upgrade is issued HB uses Xcode CLT and does not download. So it only downloads for a new HB install, not an upgrade/update in which case it finds the Xcode CLT. Yes, this is a bug for sure. since I loaded many packages (for freeswitch) and they compiled fine using the Xcode CLT. So no need to install then twice.