Сannot Run Git
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools),
missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
这是因为更新系统后会卸载xcode,重新安装后会缺失xcode的命令行工具(command line tools),所以导致部分工具无法在终端运行。
第一种方法:
运行以下命令:
xcode-select --install
并下载xcode命令行工具即可。
第二种方法:
cd /Library/Developer/CommandLineTools/usr/bin/
ll | grep "xcrun"
如果结果为空,则表示找不到。
执行:
sudo ln -s /usr/bin/xcrun