修复 mac os 升级后导致的xcrun: error:

来源:互联网 发布:excel数据统计图 编辑:程序博客网 时间:2024/05/01 14:00

最近升级MAC OS 10.11以后,git莫名其妙的不能用了。当Git clone 一个开源项目时,提示如下错误:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

重新安装一下xcode-select即可,命令如下:
xcode-select –install

之后git又可以正常工作了。
(或者不重装,“sudo xcode-select -switch /”一下也可)。

0 0