Homebrew keeps saying XCode is not installed

10

1

I'm trying to installed Ruby using Homebrew, the OSX package manager.

When I run 'brew install ruby' I keep getting the message 'Warning: XCode is not installed!'. XCode is installed, it's lying.

Is there anything I can try to fix this? I'm running Lion with XCode 3.2.6.

Jaco Pretorius

Posted 2011-11-03T19:41:22.317

Reputation: 397

I'm not really looking to use any of the new XCode stuff tho... It's not like Homebrew had a dependency on XCode 4... – Jaco Pretorius – 2011-11-03T19:57:15.680

@slhck - turns out you were right. Upgrading to XCode 4 solved it. So I guess the actual bug here is that the error message is incorrect - it should say something like 'Warning: You are using an outdated version of XCode'. If you post that as the answer I'll accept? – Jaco Pretorius – 2011-11-03T21:45:51.007

Answers

3

According to the Homebrew Wiki, you need to use an Xcode version ≥ 4.1 when running OS X Lion.

They actually say …

Note that using an XCode older than 4.1 on 10.7 may cause build errors.

… but the "warning" message is probably misleading. Try updating Xcode to the latest version via the Mac App Store.

slhck

Posted 2011-11-03T19:41:22.317

Reputation: 182 472

8

Homebrew does not work out of the box with XCode 4.3. You also need to install the Command Line Tools for Xcode.

You can do this by starting XCode and going to Preferences->Downloads->Command Line Tools and click on install. Or get them mannually from https://developer.apple.com/downloads/index.action.

Finally I had to call

 xcode-select -switch /Applications/Xcode.app

BetaRide

Posted 2011-11-03T19:41:22.317

Reputation: 2 099

1

You might also try a reboot after installing Xcode.

I was having this problem too (Brew claiming xcode wasn't installed), running 10.7. I had removed Xcode 4.1 and used the app store to install Xcode 4.2, so it was definitely up to date. I manually added /Developer/usr/bin to my path, which didn't help. But a reboot did.

Some Guy on the Internet

Posted 2011-11-03T19:41:22.317

Reputation: 11

0

Add the following directory to your path, by adding this line to your ~/.bash_profile:

export PATH=$PATH:/Developer/usr/bin:/Developer/usr/local/bin

fijiaaron

Posted 2011-11-03T19:41:22.317

Reputation: 101

0

What worked for me was simply to start the XCode app and click "OK" on "Start using XCode"...

xpmatteo

Posted 2011-11-03T19:41:22.317

Reputation: 97