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.
Seen on:
iOS
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
Most viewed in iOS
Other ways to find it
🧠 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026