--> mysql安装在/usr/local/下
perl Makefile.PL --mysql_config=/usr/local/mysql/bin/mysql_config --testuser=root --testpassword=s3kr1t
make
make test
出现以下错误:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base....................String found where operator expected at t/00base.t line 20, near "BAIL_OUT "Unable to load DBI""
(Do you need to predeclare BAIL_OUT?)
String found where operator expected at t/00base.t line 21, near "BAIL_OUT "Unable to load DBD::mysql""
(Do you need to predeclare BAIL_OUT?)
syntax error at t/00base.t line 20, near "BAIL_OUT "Unable to load DBI""
syntax error at t/00base.t line 21, near "BAIL_OUT "Unable to load DBD::mysql""
BEGIN not safe after errors--compilation aborted at t/00base.t line 22.
# Looks like your test died before it could output anything.
t/00base....................dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-6
Failed 6/6 tests, 0.00% okay
t/10connect.................Use of uninitialized va
lue in concatenation (.) or string at t/10connect.t line 20.
skipped
all skipped: ERROR: Can't continue test
t/20createdrop..............Use of uninitialized value in concatenation (.) or string at t/20createdrop.t line 19.
skipped
all skipped: ERROR: . Can't continue test
t/25lockunlock..............Use of uninitialized value in concatenation (.) or string at t/25lockunlock.t line 23.
skipped
all skipped: Can't connect to database ERROR: . Can't continue test
t/29warnings................skipped
all skipped: ERROR: install_driver(mysql) failed: Can't load '/usr/local/DBD-mysql-4.008/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.16: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/DynaLoader.pm line 230.
t/30insertfetch.............Use of uninitialized value in concatenation (.) or string at t/30insertfetch.t line 18.
skipped
all skipped: ERROR: . Can't continue
test
t/31insertid................Use of uninitialized value in concatenation (.) or string at t/31insertid.t line 18.
make: *** [test_dynamic] Interrupt
从这里找到出错的原因
http://mail.pm.org/pipermail/za-pm/2008q4/000320.html
|> Ok, the problem seems to be your version of Test::More. Upgrade it to
|> Test-Simple-0.80 and try the tests again:
升级Test-Simple
make test
继续出错
Can't load '/usr/local/DBD-mysql-4.008/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.16:
ln -s /usr/local/mysql-5.1.30-linux-x86_64-glibc23/lib/libmysqlclient.so.16 /usr/lib64/
make test
测试顺利通过
另外还可以参考这篇文章
http://blog.c1gstudio.com/archives/183

发表评论