Mac使用git提示active developer path (“/Applications/Xcode.app/Contents/Developer“) does not exist

在Mac上卸载Xcode后,使用Git时遇到错误提示「active developer path」不存在。解决方法是通过命令行安装独立的命令行开发工具,执行「xcode-select --install」,两分钟后即可解决问题,恢复正常Git操作。
摘要由CSDN通过智能技术生成

场景:之前在AppStore安装的Xcode,由于空间占用太大,就卸载了,结果卸载完后,使用git管理项目就报错了:

git checkout master
xcrun: error: active developer path ("//Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.

差点又花好几个小时去App Store下载了,别慌,仔细读一读报错文案:

在这里插入图片描述
第一句:就是让你重新指定希望用于命令行开发工具的Xcode,前提是你还有个xcode路劲,看起来怪麻烦的

Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值