invalid active developer path 🍎 iOS

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

  1. Install: xcode-select --install
  2. Point to Xcode: sudo xcode-select -s /Applications/Xcode.app
  3. Reset: sudo xcode-select --reset

Detailed fix by platform

Shell

  1. swift
    xcode-select --install
    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
    xcode-select -p

How to diagnose

  1. Path — xcode-select -p
  2. 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:

🧠 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.