mac报错:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
场景:
电脑存储空间不够,删除了Xcode
解决方法:
- 打开命令终端运行
xcode-select --install
回车后,系统弹出下载xcode组件,点击确认,下载完成后即可。
mac中很多软件都需要依赖xcode的先关组件。 - 移除 CommandLineTools 重新安装
rm -rf /Library/Developer/CommandLineTools
登录苹果开发网站下载.dmg
文件安装
https://developer.apple.com/download/more/