git 升级_解决Mac OS升级系统后git无法使用的问题

手欠升级了Mac OS,原本git用得好好的现在一运行就报错,

跟网友们的情况一模一样,但是他们的解决办法根本没有用!而且大家都是互相抄作业,行不行自己试了才知道。

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


作者:Devid
链接:https://www.jianshu.com/p/50b6771eb853
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
d540df2ec6ca61ac00b3e91238f67b88.png

执行之后提示要更新软件:update Xcode Command Line tools之类的(详细不记得了),反正就是让你同意,点了同意之后说连接不到服务器,卒。

中文搜索的结果大概都是这么解决,对我来说都不行,几近放弃,最后硬着头皮看看tackoverflow,有个2000+赞的回答,神仙指出了上面两条解决不了的话,还有新的路子

Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)​stackoverflow.com

8ff7c5c428a02d9276673ff63b92a1f4.png

就是:直接去苹果开发者官网去下载更新这个tool!https://developer.apple.com/download/more/

原谅我表述粗糙,但希望对你有帮助。

知乎要作为我的错题本儿了。