DBD-mysql安装出错处理

| 暂无评论 | 暂无引用通告

--> 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

暂无引用通告

发送引用通告网址: http://supersun.info/mt/mt-tb.cgi/940
如果您想引用这篇日记到您的Blog,请复制上面的链接,放置到您发表文章时的相应界面中。

发表评论

最新资源

  • IMG_1437.JPG
  • line.png
  • bar.png
  • perl_calander.jpg

关于此日记

此日记由 supersun 发表于 2009年7月 6日 17:37

此Blog上的上一篇日记mod_perl的安装过程

此Blog上的下一篇日记啤酒烧鸭

首页归档页可以看到最新的日记和所有日记。