After a macOS upgrade, git and make often fail with "xcrun: error: invalid active developer path". Vovy reinstalls Apple's Command Line Tools and gets you back.
Git stopped working after I updated macOS, it says invalid active developer path
How it works
- Read the exact error: Vovy runs git --version and reads the error. The xcrun message means Apple's Command Line Tools, the compilers and git that ship separately from macOS, went missing in the update.
- Start the Command Line Tools install: Vovy runs xcode-select --install, which opens Apple's installer window. You click Install and agree to the license yourself.
- Wait out the download: The download is a few hundred megabytes. Vovy watches the progress window and tells you when it finishes so you can keep working.
- Point xcode-select at the right folder: If you also have full Xcode, Vovy checks xcode-select -p and resets the path when it points at an old or deleted location.
- Confirm git works again: Vovy reruns git --version and your last failing command, then shows a card with what broke and why macOS updates do this.
What you provide
- Your Mac login password (typed by you)
- The command that failed
What you get
- Command Line Tools reinstalled
- git, make and clang working again
- Plain explanation of the xcrun error
- Your original command rerun
FAQ
Did the update delete my projects?
No. Only Apple's developer tools were removed or invalidated. Your files and repos are untouched.
Do I need the full Xcode app?
Not for web projects. The Command Line Tools are enough for git, Homebrew and npm. You only need full Xcode for building iOS apps.
Will this happen again?
It often does after major macOS upgrades. The fix is the same one command each time.
Related tasks
All tasks