在探索swift源码编译时出现以下错误
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use sudo xcode-select --switch path/to/Xcode.app
to specify the Xcode that you wish to use for command line developer tools, or use xcode-select --install
to install the standalone command line developer tools.
See man xcode-select
for more details.
ERROR: command terminated with a non-zero exit status 1, aborting
解决方法:在终端执行sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
命令,然后终端输入电脑密码就OK了