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
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/
drwxr-xr-x 3 root admin 96 4 Nov 19:32 share
$ which xcrun
$ xcode-select -p
Still, as I normally do, I entered the command to install and update the Developer Tools in the terminal:
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.
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:
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:
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?
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.