Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save yetanothernguyen/3181128 to your computer and use it in GitHub Desktop.
Save yetanothernguyen/3181128 to your computer and use it in GitHub Desktop.
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

[insert screenshot]

3) Let Everyone Know Where XCode Is

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

4) Install X11

Visit http://xquartz.macosforge.org/trac/wiki and download and install 2.7.2+.

You will need to fix the symlink it makes:

ln -s /opt/X11 /usr/X11

5) Reinstall your brews

brew list

Will tell you what you need to check. Try out everything one by one and when one doesn't work brew remove it and then reinstall it. If the install doesn't work, try brew install it --use-gcc to prevent llvm from getting in the way.

Things that gave me issues that I had to remove and install:

  • macvim
  • imagemagick
  • ghostscript

You might need to install libxml2 and link it manually to make sure you don't get the wrong xml2-config if your path:

$ brew install libxml2 $ brew link libxml2

6) If you have problems with install gem with C extension

cd /usr/bin && sudo ln -s llvm-gcc-4.2 gcc-4.2

@bowsersenior
Copy link

I was able to get things working by just installing "Command Line Tools 10.8 for Xcode - Late July 2012" (not XCode itself) from:

https://developer.apple.com/downloads/index.action

(Follow the "View all downloads" link from the Mac Dev Center page)

FYI, I did not have XCode installed on Lion, just the "Command Line Tools". Not sure if the new XCode command line tools will play nice with the old XCode.

@bowsersenior
Copy link

BTW, thanks for putting this gist together. It is very helpful!

@christiangenco
Copy link

Ahh this is fantastic. Thank you, @myobie, and @DAddYE so much!

@danjesus
Copy link

Thanks man, on the fly!

@abrar-ali3
Copy link

How do you check each one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment