12

Hello,

This question is about the Command Line Developer Tools that are usually installed with xcode-select --install and updated via a software update from the Mac App Store (at least until macOS 10.13). I use the developer toolchain on a daily basis and it has always worked and updated without issues.

Today I've updated my mac from High Sierra 10.13.6 to Mojave 10.14.1, and I've lost the ability to update the Developer Tools.

After the update I've executed a terminal command that relies on the developer tools being installed. It was a command to update Homebrew, although I don't think that the specifics matter, as I believe that any task that tried to access the developer tools would have triggered the same error message.

The error was:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

enter image description here

The phrasing was new (maybe), but I thought that it was caused by the usual need to re-install the Developer Tools after some macOS updates.

Later I tried to dig a bit deeper into the failure, and found out that:

$ ls -l /Library/Developer/CommandLineTools/usr/
total 0
drwxr-xr-x 3 root admin 96 4 Nov 19:32 share

$ which xcrun
/usr/bin/xcrun

$ xcode-select -p
/Library/Developer/CommandLineTools

Still, as I normally do, I entered the command to install and update the Developer Tools in the terminal:

xcode-select --install

This started the usual procedure: modal window to confirm, then request to accept the license agreement, followed by a progress bar. Except that it failed very quickly with an unexpected error:

Can’t install the software because it is not currently available from the Software Update server.

enter image description here

I've tried several times, to no avail. It gets always stuck.

Sometimes, however, the failure causes the System Preferences to report a pending update:

enter image description hereenter image description here

If I open that preference panel it starts searching for updates, and it always finds nothing except the first time that it happened. The first time, it found this:

enter image description here

enter image description here

It literally suggested me to install the updates for macOS 10.11 and 10.13. I have no idea why.

I closed the preference without installing, and as I said it hasn't shown them again. There is also no update available in new Mac App Store.

Is this a known issue? Is there any way to resolve the problem?


Update

Of course I can download the Dev Tools for macOS 10.14 installer from https://developer.apple.com/download/more/.

Before installing them manually, though, I'm wondering if there is anything that's broken with the system.

7
  • 1
    Hi, how old is your Mac, and was the El Capitan ever on it.
    – Ruskes
    Commented Nov 5, 2018 at 2:15
  • It's definitely not a new system. It has run all versions of macOS since Mountain Lion. I've been wondering about doing a clean install, but I'd reserve it as a last resort.
    – tompave
    Commented Nov 5, 2018 at 2:18
  • Just wondering why would it offer you to install El Capitan stuff. ? did your OS loose its identity ? or is your profile at Apple Developer corrupt.
    – Ruskes
    Commented Nov 5, 2018 at 2:23
  • I've been wondering the same. Both El Capitan and High Sierra. I can't think of a reason other than a bug. The previous versions of the dev tools are not installed, and I don't think that there are any stray metadata files left behind, otherwise the El Capital tools would have interfered with the dev tool update process on both Sierra and High Sierra, which has always run smoothly.
    – tompave
    Commented Nov 5, 2018 at 2:25
  • 1
    xcrun tells you the problem: your command line tools path: /Library/Developer/CommandLineTools is wrong. It's not your fault, Apple just decided to move it. Simply fix it with xcode-select.
    – athena
    Commented Nov 5, 2018 at 12:12

4 Answers 4

8

I faced the same problem. The way I have solve the issue is given below.

  1. I got the new xcode 10.1 from App Store. Though the problem existed.
  2. Then I run xcode-select --install which didn’t work.
  3. I update my homebrew by brew update. Than I run sudo xcode-select --reset.

Now it works fine.

1
  • 1
    Thanks for the suggestion, but this didn't work for me.
    – tompave
    Commented Nov 5, 2018 at 23:31
7

I'm the original poster. In the end I resolved the problem by installing the tools manually, with the installer I downloaded from https://developer.apple.com/download/more/.

0

I had the same problem. It started to work without doing nothing special. I only run the following commands:

xcode-select -print-path

then

cd /Library/Developer/CommandLineTools/usr/share/man

finally

whatis xcode-select

after that I was able again to run commands like git etc.

1
  • Thanks for the suggestion, but I did this already and it didn't help. xcode-select --print-path is the same as xcode-select -p, for which I've provided the output in my question. It's interesting that on your system it resolved itself.
    – tompave
    Commented Nov 6, 2018 at 21:13
0

FWIW here's what helped me:

  1. Uninstall Homebrew completely (see FAQ).
  2. sudo xcode-select --reset (thanks for the idea @Boka!).
  3. Install Homebrew again (see brew.sh).
3
  • Thanks for the suggestion, but this doesn't help in my case. The problem is not with homebrew, it's with xcode-select. The homebrew installation is simply a user of the tools installed by xcode-select. If the problem wasn't raised by running a homebrew command, it would be raised by any other direct call or shell script that tried to use one of those tools (e.g. clang, make). I know because I tried. As I told @Boka, also, xcode-select --reset didn't help in my case.
    – tompave
    Commented Nov 6, 2018 at 21:10
  • Sure, my problem was also with Command Line Tools rather than Homebrew, with similar symptoms (failing on being “not currently available” and offering strange updates in Preferences) so I left the comment just In case. Sad to hear that didn’t help you — perhaps some other variables are different (presence of Xcode itself? current state of Homebrew installation? etc)
    – Gleb A.
    Commented Nov 8, 2018 at 8:33
  • 1
    There is no Xcode installed, and the state of Homebrew should not be relevant.
    – tompave
    Commented Nov 8, 2018 at 9:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .