请注意,本文编写于 1725 天前,最后修改于 1039 天前,其中某些信息可能已经过时。
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/