Mac OS: xcrun error: invalid active developer path, missing xcrun

Bent Petersen
Apr 6, 2021

--

On my Mac, I suddenly ran into an error when I tried to update my oh-my-zsh. I have no idea why, as I haven’t changed any configuration lately. I’m running MacOS Big Sur version 11.2.3.

The error was:

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

Fortunately, there is an easy solution to that — just install, or reconfigure, the Xcode toolkit. You can either download it from the Appstore, from the Apple Developer download section, or you can install it via the Terminal:

$ xcode-select --install

If you already have it installed and need to reset it, you can do the following (you probably need sudo rights to do that):

$ sudo xcode-select --reset

--

--

Bent Petersen
Bent Petersen

Written by Bent Petersen

Associate Professor in bioinformatics at the University of Copenhagen, Denmark

No responses yet