macOS大更新导致git和svn无法使用

大更新之后 更新一堆自带没用软件之后

$ 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)

# mac更新 

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×