LoginSignup
128

More than 5 years have passed since last update.

MacにHomebrewを導入する方法

Posted at

自分用の備忘録ですので、読みにくい場合があります。

Homebrewとは

MacOS用のパッケージ管理システム。ソフトウェアやライブラリを導入するのが楽になります。

インストール方法

1.AppStoreでXcodeのインストール

2.コマンドライン・デベロッパ・ツールのインストール

xcode-select --install

3.Homebrewのインストール

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

最新のコマンドは、Homebrewにアクセスしてください。

4.確認

brew doctor

とコマンドを打ち、

$ brew doctor
Your system is ready to brew.

となっていれば導入成功です。

基本的なコマンド

Homebrewではパッケージのことをformulaと呼びます。

バージョン確認

brew --version

自分のですと、

$ brew --version
Homebrew 1.3.3
Homebrew/homebrew-core (git revision baf0; last commit 2017-09-25)

でした。

問題がないかのチェック

brew doctor

アップデート

brew update
brew upgrade  <--更新のあるformulaを再ビルドする

インストール方法

brew install <formula>

インストール済みのformulaの確認

brew list

アンインストール方法

brew uninstall <formula>

不要なformulaの削除

brew cleanup

-nをつけることで消されるものの一覧を表示できる。

formulaの情報を見る

brew info <formula>

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
128