卸载了mac上的xcode,因为有限的存储空间,但是一些命令发现出现问题,比如git gcc等且报错:
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer/") does not exist, use `xcode-select --switch path/to/Xcode
找了很多国内的解决方案,都有问题。后来在stackoverflow找到了终极简单有效的方法,it works like a charm!!!
解决:
$ sudo xcode-select --reset
感谢:
https://stackoverflow.com/questions/35009531/xcrun-error-active-developer-path-applications-xcode-app-contents-developer