执行:brew install gradle
报错:
Updating Homebrew…
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: Failure while executing; git config --local --replace-all homebrew.private true
exited with 1.
libinghuadeMacBook-Pro:~ libinghua$ xcode-select –install
xcode-select: note: install requested for command line developer tools
根据报错内容和查询资料,发现xcode被卸载了,回想,前段时间更新过mac系统,导致了xcode卸载。
执行命令: xcode-select –install
重新安装。
在执行:brew install gradle
安装成功:
Updating Homebrew…
==> Downloading https://services.gradle.org/distributions/gradle-4.9-all.zip
==> Downloading from https://downloads.gradle.org/distributions/gradle-4.9-all.zip
################################################################## 100.0%
�� /usr/local/Cellar/gradle/4.9: 200 files, 81.6MB, built in 2 minutes 55 seconds