0

I already have Xcode installed and want to install Homebrew. It wants to install Xcode Command Line Tools and I don't have space. Is there a way to install Homebrew without it trying to install the Command Line Tools?

2
  • 4
    If there is insufficient space for the one, there may not be room for the other. Time to do some cleaning or get a bigger disk. – WGroleau Mar 3 at 16:42
  • If I already have Xcode installed, the install script should recognize that and not download and install the Command Line Tools. I am working with someone who have 256G MacBook Air and a slow internet connection. They did some cleaning, but still have slow internet. – chrish Mar 3 at 17:47
3

Apple's website for downloading developer tools says that "If you use Xcode, these tools are already embedded in the IDE."

So you shouldn't need to install them again.

But, as mentioned in the commments: it's a 460 Mb download. If you don't have space for that, you're not going to have space for HomeBrew, or any of the things it installs.

3
  • After every update of XCode, the next time I use it, it asks me whether I want to install the command line tools. I consider that a bug, and reported such to Apple. And homebrew needs those tools to compile and link the things it installs. – WGroleau Mar 3 at 19:35
  • I call it a bug because (1) it contradicts Apple’s claim (see also apple.stackexchange.com/questions/120572/…) and (2) the first time I did it (before bundling), my decision should have been stored and made automatic on the next update. – WGroleau Mar 3 at 19:43
  • Xcode has a panel in its Preferences for Locations, which includes the location of the Command Line Tools. Mine is set to inside the application bundle. – benwiggy Mar 3 at 20:15
1

I found the answer by searching the Homebrew Github Closed Issues for "Xcode":

https://github.com/Homebrew/brew/issues/10714

Homebrew requires Xcode Command Line Tools instead of Xcode for several reasons:

  • The CLT contains more SDKs than Xcode - Xcode usually only contains one SDK, and it may be newer than your OS, while the CLT always has a compatible SDK. Having a matching SDK is very important for some formulae.
  • The CLT is in a fixed location /Library/Developer/CommandLineTools while Xcode is not. This matters as some formulae (including Python) bake in paths into files at compile-time - if they pointed to Xcode then it will only work for people who have Xcode installed in the same place.

https://github.com/Homebrew/brew/issues/10714

You must log in to answer this question.

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