1 - 提示已经安装

sudo xcode-select --install
Password:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

2 - 需要重新授权

sudo xcodebuild -license accept
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

3 - xcodebuild找不到Xcode,所以我们要重定向一下Xcode的文档的位置

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
最后修改:2021 年 12 月 05 日 09 : 15 PM
如果觉得我的文章对您有用,可随意赞赏~