How to fix Git error ‘invalid active developer path’ after MacOS update

27 Sep

After upgrading to macOS Mojave,  I tried running GIT from Terminal or IDE but it kept giving the following error:

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

The problem is that you are using XCode and you explicit have to agree to the license agreement. So open Terminal, and run the following:

xcode-select --install

This will download and install xcode developer tools and fix the problem. As a follow on step, you may need to reset the path to Xcode if you have several versions or want the command line tools to run without Xcode.

xcode-select --switch /Applications/
xcode-select --switch /Library/Developer/CommandLineTools



Posted by on 27-09-2018 in Uncategorized


Tags: , ,

7 responses to “How to fix Git error ‘invalid active developer path’ after MacOS update

  1. Stephanie

    24-10-2018 at 18:47

    Thank you; this solution worked for me.

  2. Carsten Spräner

    25-10-2018 at 14:10

    Thank you! Perfect solution for me

  3. slikk66 (@slikk66)

    26-10-2018 at 17:19

    Thank you!

  4. Luis

    28-10-2018 at 02:08

    Than you! This solution worked for me also.

  5. Yoni

    21-11-2018 at 15:21

    Thanks a lot !

  6. RFS

    07-07-2019 at 01:50

    Thanks! – R

  7. venge

    10-10-2019 at 11:07

    Thank so much it worked for me


Leave a Reply

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

You are commenting using your 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: