Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wastemobile/4251278 to your computer and use it in GitHub Desktop.
Save wastemobile/4251278 to your computer and use it in GitHub Desktop.
Get Mountain Lion and Homebrew to Be Happy

讓山獅(Mountain Lion)與 Homebrew 快樂並存

1) 安裝 XCode(目前版本 4.5.2)在 /Applications

從 Mac App Store 免費下載安裝。

2) 安裝命令列工具(Command Line Tools)

在 XCode 的 Preferences > Downloads 可以選擇安裝 command line tools。

3) 讓所有程式知道 XCode 在哪裡

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

4) 安裝 X11

前往 http://xquartz.macosforge.org/trac/wiki 尋找當前的穩定版本(stable),下載 dmg 並安裝(目前為 2.7.4)。

需要修改一下軟連結(Symbolic link):

ln -s /opt/X11 /usr/X11

5) 重新安裝 brews

brew list

上述指令會告訴你需要檢查什麼(=這系統上目前透過 home-brew 安裝了哪些程式),每一個都需要執行 brew remove it 再重新以 brew install it 安裝一次,如果移除後無法再次安裝,就嘗試 brew install it --use-gcc

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

You are good to go.

Random links that may help

@wastemobile
Copy link
Author

  • git
  • git-flow
  • multimarkdown
  • haskell-platform
  • gettext
  • readline
  • wget
  • little-cms
  • jasper
  • imagemagick
  • cmake
  • libksba
  • pkg-config
  • libtiff
  • ghc
  • jpeg
  • libgpg-error
  • llvm
  • pidof

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