升级到OS X Lion后,我该如何升级Xcode?

时间:2011-10-15 17:06:22

标签: xcode upgrade osx-lion homebrew

我刚刚发现,升级到OS X Lion后,我的自制程序不再起作用了。

$ brew install clojure
Warning: Xcode is not installed! Builds may fail!
Error: No such file or directory - /usr/bin/cc

$ brew doctor
We couldn't detect gcc 4.2.x. Some formulae require this compiler.

We couldn't detect gcc 4.0.x. Some formulae require this compiler.

You have no /usr/bin/cc. This will cause numerous build issues. Please
reinstall Xcode.
Setting DYLD_LIBRARY_PATH can break dynamic linking.
You should probably unset it.
经过一些谷歌搜索,我发现我应该将Xcode升级到4.1版。问题是,我安装了3.2.5版,我找不到任何卸载它的方法。

Xcode

当我查看App Store时,看起来我根本没有安装Xcode。我担心如果我通过App Store安装它,它会与我当前安装的版本产生冲突。但是我在Applications中找不到它,也找不到任何更新功能。

软件更新不会提示我更新Xcode,我也没有在已安装的软件中看到它。

enter image description here

我该怎么办?

2 个答案:

答案 0 :(得分:5)

感谢在/Developer找到的自述文件,我找到了一种通过

卸载Xcode的方法
$ sudo /Developer/Library/uninstall-devtools --mode=all

编辑:我刚刚运行了Xcode 4的安装程序,它检测到旧版Xcode,我可以将其移至/Developer-old

答案 1 :(得分:0)

我通过

修复了它

理论上,如果您安装了Xcode4.3(在/ Applications中),这应该可以工作:

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/