背景:macOs High Sierra 升级 macOs Mojave后,idea 报错,Terminal git也不行:
Сannot Run Git
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
处理:
1、 xcode-select --install
如提示:xcode-select: error: command line tools are already installed, use "Software Update" to install updates 证明安装成功
2、安装完成后,Terminal里的git可以正常运行了,IDEA里还是同样的报错,将Git配置栏里的/usr/bin/git改为git,搞定