在终端里使用git的时候,弹出一行莫名其妙的错误:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
重装了一下xcode command line:
xcode-select --install
有可能在这里你的问题就已经解决了,但是并不是所有人重装都能解决问题,有些人似乎还要手动切换下xcode的路径才能解决。
sudo xcode-select -switch /
个人推断可能是因为git所需的lib关联到了command line tools,mac升级时改动了lib的路径所致。