Perl5.10.0は/usr/local/perl5.10.0 に野良ビルド。
な環境における、DBD::mysqlのインストール。
普通に
$ cpan -i DBD::mysql
とかやっても、
Can't exec "mysql_config": No such file or directory at Makefile.PL line 76.
Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!
Can't exec "mysql_config": No such file or directory at Makefile.PL line 466.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 466.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 466.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 466.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 466.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 466.
Failed to determine directory of mysql.h. Use
perl Makefile.PL --cflags=-I<dir>
to set this directory. For details see the INSTALL.html file,
section "C Compiler flags" or type
perl Makefile.PL --help
Warning: No success on command[/usr/local/perl5.10.0/bin/perl Makefile.PL]
CAPTTOFU/DBD-mysql-4.006.tar.gz
/usr/local/perl5.10.0/bin/perl Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Failed during this command:
CAPTTOFU/DBD-mysql-4.006.tar.gz : writemakefile NO '/usr/local/perl5.10.0/bin/perl Makefile.PL' returned status 512
とかむっちゃ怒られます。
シンボリックリンクをはってダマしてもいいんですが、perl Makefile.PL するときに--mysql_config=/path/to/mysql_config というオプションが書ける事に今更気づいたのでメモしておきます。
$ perl Makefile.PL --mysql_config=/opt/local/bin/mysql_config5
$ make && make test && make install