xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun
The Xcode Command Line Tools are missing or broken — typical right after a macOS update.
xcrun: error: invalid active developer pathmissing xcrunxcode-select: error: tool 'xcodebuild' requires Xcode Meaning
git, make, clang and many developer tools need the Command Line Tools. macOS updates often remove them; reinstalling fixes it, and xcode-select chooses which developer directory is active.
Common causes
- macOS upgrade removed the Command Line Tools
- xcode-select pointing to a deleted Xcode
- Never installed on a new Mac
⚡ Quick fix
- Install: xcode-select --install
- Point to Xcode: sudo xcode-select -s /Applications/Xcode.app
- Reset: sudo xcode-select --reset
Detailed fix by platform
Shell
- swift
xcode-select --install sudo xcode-select -s /Applications/Xcode.app/Contents/Developer xcode-select -p
How to diagnose
- Path — xcode-select -p
- Installed — /Library/Developer/CommandLineTools exists?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Android license status unknown / licenses not accepted flutter doctor: Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses
- Cannot preview in this file SwiftUI Preview: Cannot preview in this file — the preview crashed / failed to build
- cmdline-tools component is missing flutter doctor: Android SDK is missing command-line tools; download from https://goo.gl/XxQghQ — cmdline-tools component is missing
Most viewed in iOS
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026