What is xcrun and why would updating to macOS Mojave cause it to go missing?

Solution 1:

xcrun is a tool that helps managing Xcode versions on your system. It allows you to write scripts that don't need to know where your Xcode instance or developer tools are installed.

The path to the Xcode version (or developer tools) is set/read via xcode-select. You can reset it via:

sudo xcode-select --reset

You can download the command line tools (that you're going to need if you don't have a full Xcode installed) via:

xcode-select --install

Or if you have Xcode installed, select it:

sudo xcode-select --switch <path_to_Xcode.app>