Mac gcc编译环境出问题

587 阅读1分钟

MacOS C编译环境出现问题

原因: 我之前卸载过Xcode出现的

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

解决方案:

Jerry:~ Jerry$ xcode-select --install
xcode-select: note: install requested for command line developer tools