作者:手机用户2502854207 | 来源:互联网 | 2022-12-02 15:34
升级到macOS Mojave后,我尝试从终端运行GIT,但它一直给我以下错误:
xcrun:错误:无效的活动开发人员路径(/ Library/Developer/CommandLineTools),缺少xcrun:/ Library/Developer/CommandLineTools/usr/bin/xcrun.
以前它工作正常.
1> pawansgi92..:
打开终端,然后运行以下命令:
xcode-select --install
这将下载并安装xcode开发人员工具并解决问题.问题是需要明确同意许可协议.作为后续步骤,如果您有多个版本或者希望命令行工具在没有Xcode的情况下运行,则可能需要重置Xcode的路径.
xcode-select --switch /Applications/Xcode.app
xcode-select --switch /Library/Developer/CommandLineTools
我也在这个问题中找到了解决方案.
https://apple.stackexchange.com/questions/254380/macos-mojave-invalid-active-developer-path