git: error: SDK “macosx” cannot be located

最后都变了- 提交于 2019-12-12 11:13:30

问题


Just updated my machine to Yosemite. I'm getting this error from Git now:

git: error: SDK "macosx" cannot be located

I'm able to run git status with no issue, but anything like git add seems to work, but then throws this error. Command Line Tools are installed, I tried reinstalling Git.


回答1:


Not sure exactly what, but something got out of whack during the upgrade. Uninstall CommandLineTools by typing sudo rm -r /Library/Developer/CommandLineTools then reinstall. I just typed some git command like: git status and let the OS prompt me to install the CommandLineTools. Everything is happy now.




回答2:


I was also getting the git: error: SDK "macosx" cannot be located which lead me to this page.

I was also getting the message like "too many files open" and "could not fork".

Closing Spotify solved by problem. I did not reinstall Git.



来源:https://stackoverflow.com/questions/30388636/git-error-sdk-macosx-cannot-be-located

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!