18

I have installed command line tools through Xcode. When I ran xcode-select -p, its showed /Applications/Xcode.app/Contents/Developer.

However, when I ran brew config, it showed CLT: N/A. And when I updated python using brew, it showed Warning: Building python from source: The bottle needs the Apple Command Line Tools to be installed.

1
  • Always always state both the version of MacOS and of Xcode, since Apple keeps changing their behavior (and directories, and command-line interface) every coupla versions... Also helps to state your version of brew. Commented Mar 4, 2021 at 21:10

5 Answers 5

25

I've got the same issue just now. Running xcode-select --install to reinstall Command Line Tools worked for me, brew config now reports CLT: 7.3.1.0.1.1461711523.

Sign up to request clarification or add additional context in comments.

1 Comment

Seems this needs to happen even if Xcode CLI is installed (Big Sur) - It may be because there is an additional prompt for accepting EULA when running xcode-select --install - haven't tested just accepting it without reinstalling, but the reinstall plus acceptance did fix the issue
3

As xcode-select --install did not solve the issue for me:

I had to run brew doctor which listed Warning: Some installed formula are missing dependencies. including a brew install command to fix these. After running that, brew config reported CLT no longer as N/A.

2 Comments

Unfortunately, this didn't help for me. Seems like Xcode 8.3.3 full install isn't recognized for CLT by homebrew.
neither worked for me , xcode-select --install resulted in 'xcode-select: error: command line tools are already installed, use "Software Update" to install updates ' but there werent any more updates to be installed .
2

Use sudo xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools, or use xcode-select --install to install the standalone command line developer tools.

Comments

1

If you've installed the standalone version of the CLI tools (and don't have the full xcode application):

sudo xcode-select --switch /Library/Developer/CommandLineTools

(path courtesy of https://stackoverflow.com/a/40008480/758177)

Comments

0

For the same dependency issue above, xcode-select --install and clicking "Install" on the pop-up fixes this in MacOS Catalina. Once complete, you can confirm it by typing xcode-select -v in the terminal and the output should look similar to this

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.