Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including
Stack Overflow
, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this community
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
For some reason my MacBook is constantly complaining that it needs to install Xcode tools, even if I just installed them seconds before.
If I hit "Cancel", the same dialog box can reappear in a matter of seconds. (This is effectively Apple DDOSing my brain, but that's a tangential problem.) If I hit "Install" (even though I know it won't work) it start out telling me that it will take some ridiculously long time like 111 hours,
and eventually it will finish in perhaps 20 minutes. But it will inevitably return, usually seconds later.
I can look at System Preferences and sometimes it will also say I have updates waiting:
But this never solves the problem either.
After hitting "Ok", it might even momentarily act like everything is fine:
But the problem always returns.
I'm on 12.6 (21G115).
And yes, I've tried rebooting.
–
–
just open Xcode if you have it, and let it complete the installation.
Full Answer
Even though I don't use Xcode itself
at all
and only installed it for the command line tools for other apps that use them, it seems that Apple cannot conceive of this situation, and they don't actually complete the installation
until you open Xcode
🤦🏼♂️
So if you
have
the full Xcode, the dialogs that claim to update the command line tools are lying to you. You must open Xcode itself before the update finishes.
–
–
I encountered this.
I fixed it by
Uninstalling the Command Line Tools
The reinstalling them from the
Apple Developer Downloads
Simples
Here's what's worked for me. It's unclear what steps are optional or not, since I've tried so many combinations:
Reset Xcode command line tools:
sudo xcode-select --reset
, then
sudo rm -rf /Library/Developer/CommandLineTools
Uninstall Xcode.
Re-install Xcode command line tools with
sudo xcode-select --install
.
While it is installing
, go to Systems Preferences and install those 3 updates. Do not close the Xcode command line tools install window while the Systems Preferences does its installing (even if the other window says the install failed), otherwise
both
will fail. Why does this work? Who knows, Apple writes spaghetti code.
Voila.