升级 macOS,终端里使用 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

如果没有解决问题,执行以下命令

sudo xcode-select -switch /
原文地址 www.jianshu.com
Last modification:June 6, 2022
If you think my article is useful to you, please feel free to appreciate