MacOS升级后出现xcrun: error: invalid active developer path, missing xcrun

291 阅读1分钟

今天升级完Mac OS Ventura 13.2.1版本之后,git 出现奇怪的问题:

  • IDE(Android Studio) 无法查看 annotate
  • 修改后的文件,不显示diff
  • git clone 仓库也有异常

具体报错:

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

解决办法:重装xcode command line tools

xcode-select --install

安装完成之后,如下图,重启IDE即可
在这里插入图片描述