Macbook xcrun: error: invalid active developer path

作者:LoveEmperor-王子様

问题:xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
如图:Macbook xcrun: error: invalid active developer path

解决:

Have you upgraded to OS X El Cap­i­tan from App Store ?

Have you sud­denly started get­ting the fol­low­ing error in your
project?

xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun If yes, then here is
the solution

xcode-select --install

Remem­ber, in MAC git is attached to XCode’s Com­mand line tools.