Homebrewのエラーを1つ1つ見ていきます
先日インストールしたHomebrewですが,色々とエラーがあったようです.
そのままでも問題なく動くようですが,放置しておいても気持ち悪いので
1つ1つ解決していこうと思います.
エラーその1
Warning: Some directories in /usr/local/share/man aren't writable. This can happen if you "sudo make install" software that isn't managed by Homebrew. If a brew tries to add locale information to one of these directories, then the install will fail during the link step. You should probably `chown` them: /usr/local/share/man/de /usr/local/share/man/de/man1 /usr/local/share/man/mann
新しいパッケージをインストールした時に,manが更新できないようです.
ご丁寧に「chownでwrite権限を付与すればいいよ」とおっしゃってくれています.
まずは権限を見てみます.
$ ls -la /usr/local/share/man total 8 drwxrwxr-x 6 root admin 204 Apr 2 22:17 . drwxrwxr-x 5 root admin 170 Apr 2 22:17 .. drwxr-xr-x 3 root wheel 102 Oct 24 18:26 de drwxrwxr-x 36 root admin 1224 Apr 2 22:17 man1 drwxr-xr-x 6 root wheel 204 Mar 30 2013 mann -rw-r--r-- 1 root admin 2546 Mar 30 23:20 whatis
rootユーザにしか権限が与えられていません.
ということで
$ sudo chown HajimeMihara /usr/local/share/man/de $ sudo chown HajimeMihara /usr/local/share/man/de/man1 $ sudo chown HajimeMihara /usr/local/share/man/mann
これで一般ユーザにも権限が付与されて,1つエラーが減りました.
エラーその2
Warning: "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look for *-config scripts to determine if software packages are installed, and what additional flags to use when compiling and linking. Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name. We found the following "config" scripts: /Applications/gnuplot.app/bin/freetype-config /Applications/gnuplot.app/bin/gdlib-config /Applications/gnuplot.app/bin/libpng-config /Applications/gnuplot.app/bin/libpng15-config /Applications/gnuplot.app/bin/pdflib-config
どうやら前にインストールしたgnuplotのconfigとbrewで必要となるファイルが競合してしまうようです.
とりあえずgnuplotはアンインストールします.
するとエラーは消えました.
エラーその3
Warning: Unbrewed dylibs were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.
dylib(共有ライブラリ)が邪魔なようです.
共有ライブラリについてはまた今度.
対象ファイルをrm
で削除すると,エラーはめでたく消えました.
エラーその4・その5
先ほどのdylib
と同様に共有ライブラリである.la
,.a
,.pc
が邪魔だと言われました.
MacPortsでインストールしたソフトウエアの残骸だと思われます……
これらもrm
で削除するとエラーが消えました.
エラーその6
arning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: git
エラーを残したままgitをインストールしたため,brewとリンクが取れていないとか.
指示の通り,brew link git
でつなげてあげます.
エラーその7
Warning: Broken symlinks were found. Remove them with `brew prune`:
と言われたので,sudo brew prune
を実行すると,上手いこと消えてくれました.
エラーその8
ラストは
Warning: A newer Command Line Tools release is available Update them from Software Update in the App Store.
XCodeのコマンドラインツールをAppStoreからアップデートします.
すると……
Your system is ready to brew.
できました.
参考文献
http://blog.pinkpinkpink.net/2012/07/homebrew.html http://qiita.com/Qiita/items/c686397e4a0f4f11683d http://d.hatena.ne.jp/january/20130723/1374538421 http://qa.atmarkit.co.jp/q/2666 http://d.hatena.ne.jp/EnnuimaZ/20120502/1335928195 http://tmpla.info/archives/1716