Apple command line tools vs XCode command line tools?

7.4k views Asked by At

I downloaded XCode and made sure the XCode command line tools were installed by going to Preferences -> Locations:

enter image description here

The Problem: When I run brew upgrade it throws this error:

Error: [email protected]: the bottle needs the Apple Command Line Tools to be installed.
  You can install them, if desired, with:
    xcode-select --install

What I Want To Know: What's the difference between the XCode command line tools and these Apple command line tools? Do I need to install both?

I'm on OSX 12.3.1, with XCode 13.3.1.

1

There are 1 answers

0
JRFerguson On

Apple Command Line Tools are just another name for XCode Command Line Tools.

At your terminal, do:

xcode-select --install

Homebrew should then work.

This Homebrew issue notes:

The reason we need the Command Line Tools rather than just Xcode.app is for a few 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.