【发布时间】:2011-12-08 10:07:18
【问题描述】:
我刚刚发现,在升级到 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 版本,但找不到任何卸载方法。
当我查看 App Store 时,我似乎根本没有安装 Xcode。我担心如果我通过 App Store 安装它,它会与我当前安装的版本发生冲突。但是我在应用程序中找不到它,我也找不到任何更新功能。
软件更新没有提示我更新 Xcode,我也没有在已安装的软件中看到它。
我该怎么办?
【问题讨论】:
-
Xcode 4.0+ 与 Mac App Store 大约在同一时间推出,因此除非您拥有此版本或更高版本,否则它不会显示为与商店关联。您可以通过商店获得 Lion 的 v4.2 或登录您的开发者帐户获取 Snow Leopard 的 4.2 的 dmg。您的 Developer 文件夹中是否有任何内容,因为这是默认安装 Xcode 的位置?
-
@Luke 是的,我有 /Developer 文件夹。
-
里面有什么?应该是什么都不是,是旧 Xcode 的残余,或者是 Xcode 和 SDK 版本的完整安装。
-
我已经安装了完整的 Xcode,但我还找到了一个自述文件,建议使用
$ sudo /Developer/Library/uninstall-devtools --mode=all进行完全卸载,这样应该可以工作 :)
标签: xcode upgrade osx-lion homebrew