macOS 升级后出现xcrun: error: invalid active developer path
技术8 年前

发现 macOS 升级系统之后总会报错 git 找不到,无论是 macOS High Sierra ,还是 macOS Mojave。
错误信息:
bash
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun解决方法,重装 xcode CommandLineTools:
bash
xcode-select --install如果没有解决问题,执行以下命令
bash
sudo xcode-select -switch /