Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dcpesses/5490170 to your computer and use it in GitHub Desktop.
Save dcpesses/5490170 to your computer and use it in GitHub Desktop.

Get your dev server back to speed on Mountain Lion

(based off of '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:

sudo ln -s /opt/X11 /usr/X11

5) Get Ownership of /usr/local Back

After the upgrade, Apple will set the ownership of your /usr/local folder to root. You can easily fix this by running this command in Terminal:

sudo chown -R `whoami` /usr/local

6) Fix PHP / MySQL Settings

For some reason, php.ini gets renamed php.ini.default. While we're futzing with it, let's also fix the MySQL socket settings, as they've changed from '/var/mysql/mysql.sock' to '/tmp/mysql.sock':

sed -e 's/var\/mysql/tmp/g' /etc/php.ini.default > /tmp/php.ini && sudo mv /tmp/php.ini /etc/php.ini

7) 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

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