Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew cannot find installed command line tools

Tags:

xcode

homebrew

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.

like image 803
Chao Wang Avatar asked Aug 06 '16 12:08

Chao Wang


People also ask

How do I update Xcode command line tools on Mac?

The command you need to update Xcode is softwareupdate command [args ...] . You can use softwareupdate --list to see what's available and then softwareupdate --install -a to install all updates or softwareupdate --install <product name> to install just the Xcode update (if available).


3 Answers

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.

like image 160
br_ Avatar answered Oct 13 '22 21:10

br_


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.

like image 32
Andi Avatar answered Oct 13 '22 20:10

Andi


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.

like image 39
Onkar Parmar Avatar answered Oct 13 '22 21:10

Onkar Parmar