升级MacOS(Mojave)后使用git问题

将MacOS升级到Mojave版本后,使用git工具时,出现如下错误提示:
guochongxindeMacBook-Pro:study guochongxin$ git status .

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

解决方法:
执行xcode-select --install命令,会弹出一个对话框,按提示安装上相应工具即可,因为git附加了Xcode的命令。

参考资料:
https://my.oschina.net/gooiem/blog/2208380
http://www.cnblogs.com/snifferhu/p/6196687.html
https://stackoverflow.com/questions/32896524/invalid-active-developer-path-error-after-upgrading-to-el-capitan

评论

此博客中的热门博文

I/O映射之I/O端口

通过Netlink检测网线插拔

使用seq_file