昨晚(2018年11月)我更新到macOS Mojave,
今天早上我在MacBook pro的Command line中导航到我的工作代码库,
在repo中键入"git status"并收到错误:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Run Code Online (Sandbox Code Playgroud) xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
这是我在 VS Code 终端中收到的错误。“#include <stdio.h>”行下有错误曲线。
这是我升级到 Mac OS Monterey 后的情况。
出现这个错误的原因是什么以及解决办法是什么?