xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer)解决办法

背景

mac下卸载了xcode,使用git等命令时就提示错误。invalid active path(Applications/Xcode.app/Contents/Developer),这种情况可以通过xcode-select --switch指定一个xcode安装路径,如果不想安装xcode,那么可以通过重置系统默认开发工具路径.

可以通过xcode-select命令来重置系统默认的CommandLineTools路径,如下

xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer)解决办法_第1张图片

sudo xcode-select -r

xcode-select --switch /Library/Developer/CommandLineTools

xcode-select -p

转载于:https://www.cnblogs.com/duanxingxing/p/8806523.html

你可能感兴趣的:(xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer)解决办法)