xcrun error invalid active developer path

March 08, 2021

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

After my Mac updated to BigSur OS, I tried to check status of one of my git project using git status on command line.

Once I hit git status command I got this error that says

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

Actually problem is that the Xcode Command-line Tools needs to be updated.

Solution

Go back to your terminal and enter:

xcode-select --install

this will install latest Xcode Command-Line Tools.

You'll then receive the following output:

xcode-select: note: install requested for command line developer tools

Try now hitting git status.

Volla! It worked!


Profile picture

Written by Bharat Sunel who loves to learn new things to build better software products.

© 2023