简体   繁体   English

从Lion升级后在Mountain Lion上重新安装Xcode

[英]Reinstalling Xcode on Mountain Lion after upgrading from Lion

I'm running OSX 10.8. 我正在运行OSX 10.8。 My Mac had Snow Leopard when I got it, but I have since upgraded to Lion and then Mountain Lion. 我的Mac机上安装了Snow Leopard,但后来又升级为Lion和Mountain Lion。 I'm trying to get my Ruby on Rails environment set up, and when I run Homebrew's "brew doctor" command, I get this: 我试图建立我的Ruby on Rails环境,当我运行Homebrew的“ brew doctor”命令时,得到以下信息:

Warning: You seem to have osx-gcc-installer installed.
Homebrew doesn't support osx-gcc-installer. It causes many builds to fail and
is an unlicensed distribution of really old Xcode files.
Please install the CLT or Xcode 5.0.1.

Warning: Your compilers are different from the standard versions for your Xcode.
If you have Xcode 4.3 or newer, you should install the Command Line Tools for
Xcode from within Xcode's Download preferences.
Otherwise, you should reinstall Xcode.

So I uninstalled and reinstalled Xcode (now have v 5.0.2) and the command line tools, and I'm still getting the same messages. 因此,我卸载并重新安装了Xcode(现在有5.0.2版)和命令行工具,但仍然收到相同的消息。 I've tried doing: 我试着做:

sudo /Developer/Library/uninstall-devtools --mode=xcodedir

But I get this in response: 但是我得到这个回应:

sudo: /Developer/Library/uninstall-devtools: command not found

Thanks in advance for any help. 在此先感谢您的帮助。

Try which gcc to figure out which gcc you are using. 尝试使用which gcc找出您正在使用的gcc。

Then run which -a gcc to see all the gcc's that you have installed. 然后运行which -a gcc查看已安装的所有gcc。

You'll probably find that you're using the osx version and that changing your path ordering in shell config, eg. 您可能会发现自己正在使用osx版本,并且在shell配置中更改了路径顺序,例如。 bash.rc will fix this brew doctor error. bash.rc将修复此bash.rc brew doctor错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM