Homebrew cannot find installed command line tools - xcode

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.

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.

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.

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.

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)

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

Related

Problem with HTTPie installation on macOS

Terminal during installation indicates such a problem:
MacBook-Pro:~ synkevych$ brew install httpie
Error: The following formula
[#<Dependency: "python" []>, #<Options: []>]
cannot be installed as binary package and must be built from source.
Install the Command Line Tools:
xcode-select --install
How can I install it?
According to the error message, you will need to install Xcode Command Line Tools (so that Python 3 from Homebrew, which HTTPie depends on, can be installed):
Install the Command Line Tools:
xcode-select --install

Brew Install Error Xcode alone is not sufficient on Sierra

I'm attempting to install a package on Mac OSX Serra v10.12.6 running xCode v9.1 using HomeBrew v1.3.8.
The install and error is
TS-Mac-Pro > brew install dos2unix
Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
xcode-select --install
Then I run the command
xcode-select --install
which says the command line tool package is not available from the software update server.
Which I go into xCode it shows that the command line tools are installed.
TS-Mac-Pro > xcode-select -p
/Applications/Xcode.app/Contents/Developer
Any help would be much appreciated.
Theo
I went to Apple Developer website and downloaded the Command Line Tools dmg directly. An Apple account first needs to be setup.
The Command Line Tools can be found under -
https://developer.apple.com/download/more/
Install downloaded dmg and volia - HomeBrew is back up and running.
I just fixed this issue by deleting the current install of the command line tools and reinstalling them. See commands below:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
This fixed the issue for me in the end

How to Install Xcode Command Line Tools, Mac

I have problem with installing a program and it says that I will need to be promted to install Xcode Command Line Tools. How do I install that?
From Terminal execute xcode-select --install

xcode-select error while trying to install Homebrew on macOS Sierra

While trying to install Homebrew on macOS Sierra:
xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools'
Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
Yes , i have solved this error by using following steps.
In your terminal write command ::  xcode-select --install
after doing step no 1 you will get one popUp , so click on install
I had the same error and the only way I could get around it was to install the Xcode command line tools manually by downloading them directly from developer.apple.com. Once installed the brew install worked without issue.
The easiest way to handle this issue is to run:
xcode-select --install
Unfortunately I can’t make comments, so I’ll post it as an answer:
If selecting the correct Xcode version for Homebrew is what you are trying to achieve, then try this:
For Xcode release:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
For Xcode beta:
sudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer
I resolved this error by installing the latest version of Xcode.
I tried installing Command Line Tools manually, but Command Line Tools get failed while installing. Reinstalling XCode did not help at all.
So I attempted below command helped me resolve this error on Big Sur 11.2.1 (20D74)
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

brew doctor says "Your Xcode (3.2) is outdated Please install Xcode 4.6.2." but I already have it installed

brew doctor
gave me bunch of warnings, the last one is
Warning: Your Xcode (3.2) is outdated
Please install Xcode 4.6.2.
But I already have it installed on Mac OS X 10.8.3.
Try using the Xcode-select utility to set the default Xcode path:
sudo xcode-select -switch /path/to/Xcode.app
If this doesn't work you might also have to download and install the latest Xcode command line tools.
To uninstall older Xcode I did:
sudo /Developer/Library/uninstall-devtools –mode=all
as described here, and the warning disappeared.

Resources