メモ: Homebrewのインストール

最近いろいろあって12年ぶりにMacを入手しました。ひとまず操作のリハビリをしています。

今のMacBook Proのラインナップにはアンチグレアディスプレイがないと知って心配していましたが、実際のところ写り込みはまったく気になりません。これがRetinaってやつか〜(遅いですね)

今日はHomebrew(http://brew.sh)を初めてインストールしたので、メモしておきます。

手順

App StoreXcodeを検索して、インストールする(2.18GBくらいあった)。

ターミナルにコマンドを打って、Command Line Tools for Xcodeをインストールする。

$ xcode-select --install
xcode-select: note: install requested for command line developer tools

bashはプリインストールされていたので省略。

ここで大事なのは、Xcodeを一度起動して利用ライセンスに同意し、必要なコンポーネントがインストールされてから、次のステップに進むこと。ダウンロードだけして先へ進んではいけない。

Homebrewをインストールする。以下、ターミナルのログ。

$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

==> This script will install:

/usr/local/bin/brew

/usr/local/Library/...

/usr/local/share/man/man1/brew.1

 

Press RETURN to continue or any other key to abort

==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew

==> Downloading and installing Homebrew...

remote: Counting objects: 181409, done.

remote: Compressing objects: 100% (49970/49970), done.

remote: Total 181409 (delta 130271), reused 181409 (delta 130271)

Receiving objects: 100% (181409/181409), 35.60 MiB | 1.01 MiB/s, done.

Resolving deltas: 100% (130271/130271), done.

From https://github.com/Homebrew/homebrew

 * [new branch]      master     -> origin/master

HEAD is now at 8b01ead adobe-air-sdk 14.0

==> Installation successful!

==> Next steps

Run `brew doctor` before you install anything

Run `brew help` to get started

チェックもこのとおり問題なし。

$ brew doctor
Your system is ready to brew.

補足

Xcodeのライセンス同意を済ませる前に、Homebrewのインストールに進もうとすると、次のようなエラーになる。

$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

==> This script will install:

/usr/local/bin/brew

/usr/local/Library/...

/usr/local/share/man/man1/brew.1

 

Press RETURN to continue or any other key to abort

==> /usr/bin/sudo /bin/mkdir /usr/local

 

WARNING: Improper use of the sudo command could lead to data loss

or the deletion of important system files. Please double-check your

typing when using sudo. Type "man sudo" for more information.

 

To proceed, enter your password, or type Ctrl-C to abort.

 

Password:

==> /usr/bin/sudo /bin/chmod g+rwx /usr/local

==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local

==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew

==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew

==> Downloading and installing Homebrew...

 

 

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

 

 

==> Installation successful!

==> Next steps

Run `brew doctor` before you install anything

Run `brew help` to get started

チェックも失敗する。

$ brew doctor

 

 

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

 

 

Please note that these warnings are just used to help the Homebrew maintainers

with debugging if you file an issue. If everything you use Homebrew for is

working fine: please don't worry and just ignore them. Thanks!

 

Warning: You have an outdated version of /usr/bin/install_name_tool installed.

This will cause binary package installations to fail.

This can happen if you install osx-gcc-installer or RailsInstaller.

To restore it, you must reinstall OS X or restore the binary from

the OS packages.

 

Warning: Git could not be found in your PATH.

Homebrew uses Git for several internal functions, and some formulae use Git

checkouts instead of stable tarballs. You may want to install Git:

  brew install git

 

 

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

 

 

 

Warning: You have not agreed to the Xcode license.

Builds will fail! Agree to the license by opening Xcode.app or running:

    xcodebuild -license

これからちょっとずつ環境構築する予定。

追記。冒頭のキャプチャでシリアルナンバを隠す処理のために、Skitchをインストールした。