Skip to main content

解决 macOS 系统 xcrun error invalid active developer path 异常

· One min read
Alan

ref How to fix Mac OS: xcrun error: invalid active developer path, missing xcrun

升级完mac系统之后运行 zsh, python3, git 等命令提示以下错误:

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

解决办法是打开终端执行: xcode-select --install, 或者手动安装 XCode.

如果已经安装了还是不行,执行 sudo xcode-select --reset 重置一下.