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.app xcode-select --switch /Library/Developer/CommandLineTools
Stephanie
24-10-2018 at 18:47
Thank you; this solution worked for me.
Carsten Spräner
25-10-2018 at 14:10
Thank you! Perfect solution for me
slikk66 (@slikk66)
26-10-2018 at 17:19
Thank you!
Luis
28-10-2018 at 02:08
Than you! This solution worked for me also.
Yoni
21-11-2018 at 15:21
Thanks a lot !
RFS
07-07-2019 at 01:50
Thanks! – R
venge
10-10-2019 at 11:07
Thank so much it worked for me