Brew: New install path for the Xcode command line tools confuses new brew installations

Created on 1 Nov 2018  路  4Comments  路  Source: Homebrew/brew

Hi,

I got a new MacBook Pro and installed Mojave right after the first boot. I then tried to install homebrew but the window brew is opening to install the CLI tools kept failing with the following message:

Can鈥檛 install the software because it is not currently available from the Software Update server.

I decided to install Xcode and then install the CLI tools when opening Xcode. I did just that, tried to install homebrew again and hit the same error message.

While investigating I found out that the CLI tools were now in /Applications/Xcode.app/Contents/Developer instead of /Library/Developer/CommandLineTools!

I ran sudo ln -s /Applications/Xcode.app/Contents/Developer /Library/Developer/CommandLineTools and was able to proceed with the installation of homebrew. Maybe you should check for the CLI tools in /Applications/Xcode.app/Contents/Developer now too.

outdated

Most helpful comment

screenshot 2018-11-01 at 16 24 39

This works fine.

All 4 comments

It does happen sometimes that Apple's software update server contains no CLI tools during transitions in their tools releases, or due to some configuration mishap on their end (usually I've seen it resolve itself within a day or so).

An installation of Xcode contains a full suite of the CLI tools. I would expect brew to detect that if you have a supported Xcode installation, that it should consider developer tools already installed and continue happily along.

Symlinking /Applications/Xcode.app/Contents/Developer to /Library/Developer/CommandLineTools is likely to confuse things further and I wouldn't recommend it.

I decided to install Xcode and then install the CLI tools when opening Xcode.

That doesn't install the CLI tools. To do so you need to run xcode-select --install. If that fails, you need to download them manually from developer.apple.com/downloads/

While investigating I found out that the CLI tools were now in /Applications/Xcode.app/Contents/Developer instead of /Library/Developer/CommandLineTools!

These are not equivalent.

I ran sudo ln -s /Applications/Xcode.app/Contents/Developer /Library/Developer/CommandLineTools and was able to proceed with the installation of homebrew.

This will break things.


Please always fill out the issue template in future.

Sorry for not using the issue template, because of a bad timing I thought it was a Firefox extension messing with the textarea content.

You are both right that the symlink was a bad idea, macOS wanted to download updates for all CLI tools since Sierra (!) and failed doing that, I had to remove the symlink.

The symlink is what allowed me to install homebrew thought. Note that https://developer.apple.com/downloads/ still don't provide the CLI tools for 10.14 and Xcode 10.1 final, so installing homebrew would have been impossible for my setup.

screenshot 2018-11-01 at 16 24 39

This works fine.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cfredhart picture cfredhart  路  4Comments

fxcoudert picture fxcoudert  路  3Comments

vitahlin picture vitahlin  路  4Comments

javian picture javian  路  4Comments

JustinTArthur picture JustinTArthur  路  3Comments