【问题标题】:VS Code C Error - Invalid Active Developer PathVS Code C 错误 - 无效的活动开发者路径
【发布时间】:2021-11-01 10:30:22
【问题描述】:

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

这是我在 VS Code 的终端中遇到的错误。 “#include ”行下有错误曲线。

这是在我升级到 Mac OS Monterey 之后。

这个错误的原因是什么,解决方法是什么?

【问题讨论】:

标签: c visual-studio-code xcrun


【解决方案1】:

升级 Mac OS 时,代码命令行工具有时会停止工作。这可以通过在终端中运行来解决:

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

如果你没有安装 Xcode,你应该这样做:

xcode-select --install

这将在没有 Xcode 的情况下安装命令行工具。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-12-30
    • 1970-01-01
    • 2014-10-21
    • 2021-11-02
    • 1970-01-01
    • 2021-10-27
    相关资源
    最近更新 更多