Mac に mytop をインストール
Mac に mytop コマンドをインストールしようとしたらちょっとハマったのでメモ。
$ brew install mytop Unsatisfied dependency: DBD::mysql Homebrew does not provide Perl dependencies; install with: cpan -i DBD::mysql Error: An unsatisfied requirement failed this build.
DBD::mysql が必要なのでインストールしようとしたらTestでこけた。
libmysqlclient.18.dylib をリンクすれば解決するらしい。
(参考:= DBD::mysql をOSX Lionにインストールする - ぺっくブログミラー@peccul)
しかし、これでもだめだった。。。
"--testuser" などをつければいいらしい。
cpanm の場合は、~/.cpanm/work/ 以下 に落ちてきているので、そこに移動して作業する。
参考
- myfinder's blog: DBD::mysqlのインストールができないとお嘆きの方へ
- [mac][macports][perl] cpanmで失敗したDBD::mysqlを(半)手動でインストールする « いわぶろ(ろてん)
- Mac OS XにDBD::mysqlをインストール - $shibayu36->blog;
cd ~/.cpanm/work/xxxxxxx.xxx/DBD-mysql-X.xxx perl Makefile.PL --testuser="dbuser" --testpassword="dbpass" make & make install
あとは、もう一度最初のコマンドを実行。
$ brew install mytop Unsatisfied dependency: DBD::mysql Homebrew does not provide Perl dependencies; install with: cpan -i DBD::mysql Error: An unsatisfied requirement failed this build.
cpanモジュールインストールしたのに、まだエラーがでる。。。
しかたがないので、mytop.rb を編集する。
brew edit mytop
以下編集diff。
-depends_on 'DBD::mysql' => :perl +#depends_on 'DBD::mysql' => :perl
brew install mytop
無事?インストールできた。
編集したmytop.rb は元に戻しておいたほうが良いかもしれない。