【踩坑】Xcode命令行工具报错

前言

Xcode命令行工具报错:

1
2
3
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.

原因

  • 安装了Xcode命令行工具但是卸载了Xcode

解决问题

1
sudo xcode-select -switch /

完成

参考文献

CSDN——繁星蓝雨