xcrun: error: invalid active developer path, missing xcrun 错误;

来源:互联网 发布:php redis went away 编辑:程序博客网 时间:2024/05/20 05:27

在终端里使用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的路径所致。
0 0
原创粉丝点击