Redis报错:xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing

Redis报错:xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing

今天安装Redis的时候,报了一个错误:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), 
missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
12

后来发现是因为Mac最新场景下安装Xcode时已经没有Command Line了,需要单独安装。根据提示在使用命令xcode-select --install 安装时最后结果是不能安装该软件。
所以只要执行:

xcode-select --install

就可以了。

原文地址:https://www.cnblogs.com/chuwanliu/p/11185428.html