homebrewのインストール
新年早々、テレビもつまらないのでMacをいじる。カミさんの実家なのでMBAしか手元にない。
Macでの開発にはhomebrewとかいうパッケージ管理ソフトが便利らしいので入れてみることにする。
インストールの方法は、公式サイトに書かれているとおり、次のコマンドをターミナルで実行するだけ。
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
実行するとこんな感じ。途中でパスワードを聞かれたりするほか、特に厄介なことはなし。
anata-no-MacBook-Air:current_no_directory anata$ 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 ==> The following directories will be made group writable: /usr/local/. /usr/local/bin ==> The following directories will have their group set to admin: /usr/local/. /usr/local/bin Press ENTER to continue or any other key to abort ==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin 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 /usr/bin/chgrp admin /usr/local/. /usr/local/bin ==> Downloading and installing Homebrew... remote: Counting objects: 144617, done. remote: Compressing objects: 100% (47401/47401), done. remote: Total 144617 (delta 102436), reused 137062 (delta 96151) Receiving objects: 100% (144617/144617), 21.40 MiB | 860 KiB/s, done. Resolving deltas: 100% (102436/102436), done. From https://github.com/Homebrew/homebrew * [new branch] master -> origin/master HEAD is now at 8befc4e mu: fix miscompilation on 10.9 ==> Installation successful! You should run `brew doctor' *before* you install anything. Now type: brew help
インストールしたら、とりあえず "brew doctor" というコマンドを実行するのがオススメらしい。
ore-no-MacBook-Air:dev ore$ brew doctor Warning: Broken symlinks were found. Remove them with `brew prune`: /usr/local/bin/github
実行してみたら、githubのsymlinkが壊れてた。
オススメのとおり、brew prune を実行してる。
ore-no-MacBook-Air:dev ore$ brew prune Pruned 0 dead formula Pruned 1 symbolic links from /usr/local ore-no-MacBook-Air:dev ore$ brew doctor Your system is ready to brew.
よく分からんけど、きれいになったんだろう。