macOS升级到Mojave导致git无法使用

版权声明:见贤思齐焉 https://blog.csdn.net/weixin_28906733/article/details/86984401

将OSX系统版本从High Serria升级到Mojave发现git无法使用

$ git --version

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

原因是系统升级了,但是Xcode的命令行工具未升级导致的,更新一下就可以了

$ xcode-select --install

xcode-select: note: install requested for command line developer tools
弹窗安装完重启端口再输入命令就可以了

$ git --version
git version 2.17.2 (Apple Git-113)

猜你喜欢

转载自blog.csdn.net/weixin_28906733/article/details/86984401