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

发布于 2024-12-10 05:56:26 字数 934 浏览 0 评论 0原文

我刚刚发现,升级到 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 安装它,它会与我当前安装的版本发生冲突。但是我在应用程序中找不到它,也找不到任何更新功能。

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

在此处输入图像描述

我应该做什么?

I've just found out, that my homebrew doesn't work anymore after I upgraded to OS X Lion.

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

and

$ 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.

after some googling, I found out that I should upgrade Xcode to version 4.1. The problem is, I have version 3.2.5 installed and I can't find any way of uninstalling it.

Xcode

When I look at App Store, it looks like I don't have Xcode installed at all. I'm afraid that if I install it via App Store, it will somehow conflict with the version I have currently installed. However I can't find it in Applications, and I can't find any update function either.

Software Update doesn't prompt me to update Xcode, and I also don't see it in Installed Software.

enter image description here

What should I do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

捂风挽笑 2024-12-17 05:56:27

感谢在 /Developer 中找到的自述文件,我找到了一种通过 edit: 卸载 Xcode 的方法

$ sudo /Developer/Library/uninstall-devtools --mode=all

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

Thanks to the readme found at /Developer, I found a way to uninstall Xcode via

$ sudo /Developer/Library/uninstall-devtools --mode=all

edit: I just ran the installer for Xcode 4, and it detected old version of Xcode, offering me to move it to /Developer-old.

巷雨优美回忆 2024-12-17 05:56:27

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

我通过理论上

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

I fixed it by

In theory this should work if you have Xcode4.3 installed (in /Applications):

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文