[macOS General] Homebrew: インストールと使い方

memo.

[markdown]

## インストール

公式サイトを参考にワンライナーでインストール。

“`
ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)”
“`

> * [Homebrew — MacPorts driving you to drink? Try Homebrew!](http://mxcl.github.io/homebrew/)
> * [OS X Mountain Lionに「Ruby on Rails + MySQL」環境を作る(1) – Hidde’s Tips](http://d.hatena.ne.jp/hidde/20130311/1362967592)

## よく使うコマンド

こちらのコマンド一覧が分かりやすい。

> * [Homebrewの導入と使い方 | CAPH TECH](http://tech.caph.jp/2011/04/06/homebrew%E3%81%AE%E5%B0%8E%E5%85%A5%E3%81%A8%E4%BD%BF%E3%81%84%E6%96%B9/)

“`
$ brew install foo
“`

“`
$ brew remove foo
“`

“`
% brew update
Updated Homebrew from ad962106 to ca1048bf.
==> New Formulae
briss hubflow
==> Updated Formulae
fossil geocouch git-flow imagemagick neo4j tmap
gcutil git git-now libxml2 ssreflect wine
“`

“`
% brew list
autoconf libyaml pkg-config ruby zsh
:
:
“`

“`
% brew outdated
git (1.8.2, 1.8.3.1 < 1.8.3.2) ``` ``` % brew upgrade git ==> Upgrading 1 outdated package, with result:
git 1.8.3.2
==> Upgrading git
==> Downloading http://git-core.googlecode.com/files/git-1.8.3.2.tar.gz
:
:
“`

“`
% brew doctor
Warning: Your Homebrew is outdated.
You haven’t updated for at least 24 hours, this is a long time in brewland!
To update Homebrew, run `brew update`.
“`

“`
% brew cleanup
Removing: /usr/local/Cellar/git/1.8.2…
:
:
Removing: /Library/Caches/Homebrew/git-1.8.2.tar.gz…
:
:
“`

いろいろ入れられるよという事例。

> * [にひりずむ::しんぷる – homebrew で最低限これだけはいれておけってやつ](http://blog.livedoor.jp/xaicron/archives/54458405.html)

[/markdown]