“xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun” – git in terminal does not work after macOS upgrade to Catalina

This blog post is how to get git going after upgrading to Catalina (10.15).

I use git as a method of storing all my presentations and work files. It was a great way to learn how to use git. I use git commands and run them in the Terminal app on my mac.

However after upgrading to Catalina this weekend:

Problem:

I always run

git status

to see what changes I have locally.

I then run

git pull

in case I’ve made change to source control on my other computer and need to merge changes.

However I got this error:

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

Resolution:

The fix was relatively easy and I’ve had to use it before for other apps when upgrading macOS:

xcode-select --install

It took about 3 minutes to install the latest XCODE utilities/libraries and then everything worked again.

Update:

You can also try

xcode-select --reset

But my opinion was – I’ve upgraded the OS I may as well upgrade the utilities as well.

 

Yip.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s