1、在xcode下安装命令行工具,只需在命令行中输入即可:xcode-select --install
2、执行命令出现xcrun:error:active developer path (“/Volumes/Xcode/Xcode.app/Contents/Developr”) does not exist ,use xcode-select to change,也只需在命令行中输入一条命令即可:sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer |