OSX 选用独立xcode命令行开发工具

由于删除了xcode.app,导致rustc/ cargo build 无法使用

  = note: 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.app (太重了),根据提示

xcode-select --install

安装了独立的xcode命令行工具,接着选择独立的命令行工具

https://stackoverflow.com/a/40008480

sudo xcode-select -s /Library/Developer/CommandLineTools
posted @ 2022-02-21 15:20  陈昱行  阅读(129)  评论(0编辑  收藏  举报