xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun code example

Example 1: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

xcode-select --install

Example 2: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist

sudo xcode-select --reset

Example 3: xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer),

$ sudo xcode-select -r
$ sudo xcode-select --switch /Library/Developer/CommandLineTools

Tags:

Misc Example