Skip to content

Instantly share code, notes, and snippets.

@myobie
Created February 18, 2012 20:14
Show Gist options
  • Save myobie/1860902 to your computer and use it in GitHub Desktop.
Save myobie/1860902 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 the App Store.

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

Run brew doctor and fix anything it tells you.

You may also need to symlink gcc for certain ruby gems and other stuff like that:

sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2

Maybe even g++ if you use that:

sudo ln -s /usr/bin/g++ /usr/bin/g++-4.2

You are good to go.

Random links that may help

@mcella
Copy link

mcella commented Apr 16, 2013

Here you can find a very useful script to download CLT:

https://gist.github.com/uchida/3559987

@Kiodaddy
Copy link

is this a joke or what ?

@shape55
Copy link

shape55 commented Sep 16, 2018

I went thru all the above steps for 10.8.5 but when I went to install Homebrew it gives me this error:

Downloading and installing Homebrew...
fatal: unable to access 'https://github.com/Homebrew/brew/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force

I tried researching this error but couldn't find anything relevant to my specific issue. I also made sure I had curl installed as that was mentioned in some of the feedback I reviewed, and I have this:

curl 7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8} zlib/1.2.5

The only issue I ran into along the way was with X11, where I got a "Permission Denied" error after entering "ln -s /opt/X11 /usr/X11". However, I installed the latest version of it, which is 2.7.11.

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