---
title: "配置Mountain Lion和Homebrew RVM"
author: "夜鸣猪"
date: "2012-07-29T01:03:22Z"
tags: []
categories: ["编程语言"]
slug: "mountain-lion-homebrew-rvm"
draft: false
lastmod: "2012-07-29T01:03:22Z"
id: 1611131
url: "https://hlee.iteye.com/blog/1611131"
---

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.



3) Let Everyone Know Where XCode Is


```java
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:

l
```java
n -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:


```java
$ brew install libxml2 $ brew link libxml2
```