微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does no

原因:卸载了mac上的xcode,重新安装后发现项目用git提交不了,且有以下报错

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.

 

 

依次输入以下指令即可:

sudo xcode-select -r
 
sudo xcode-select --switch /Library/Developer/CommandLinetools
 
xcode-select -p

 

最后输入git status得到以下:

 

 

 

参考:https://blog.csdn.net/weixin_30721077/article/details/95149418

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐