OSX

错误信息:

Error: clang: error: unable to find utility "clang", not a developer tool or in PATH

错误原因:

xcode-select的位置错误

解决方法:

修改xcode-select指向的位置

查看xcode-select位置命令:

xcode-select --print-path

输出结果可能为:/Applications/Xcode.app/Contents/Developer

修改xcode-select指向的位置的命令:

 sudo xcode-select --switch /Library/Developer/CommandLineTools

再次执行上面命令,发现输出结果应该是:/Library/Developer/CommandLineTools ,那么修正完毕了,上面错误应该消失了!!

参考:

https://www.jianshu.com/p/5cb593f63ee8

原文地址:https://www.cnblogs.com/sunylat/p/13682399.html