首页 新闻 搜索 专区 学院

关于DBD连接mysql数据库

0
悬赏园豆:10 [已关闭问题] 关闭于 2015-04-07 10:52

前方高能请留步,终于还是要来求救了!直命正题!

DBI安装完后test结果如下:

DBI test application $Revision$
Switch: DBI 1.631 by Tim Bunce, 1.631
Available Drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge, mysql
dbi:ExampleP:: testing 3 sets of 20 connections:
Connecting... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Disconnecting...
Connecting... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Disconnecting...
Connecting... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Disconnecting...
connect 20 and disconnect them, 3 times: 0.0077s / 60 = 0.0001s
Testing handle creation speed...
80000 NullP sth/s perl 5.020000 x86_64-linux (gcc 4.4.7 -O2) 0.000013s

test.pl done

编译DBD:

test报错如下:

Test Summary Report
-------------------
t/87async.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
Files=58, Tests=1220, 17 wallclock secs ( 0.23 usr 0.23 sys + 3.22 cusr 0.69 csys = 4.37 CPU)
Result: FAIL
Failed 1/58 test programs. 0/1220 subtests failed.
make: *** [test_dynamic] 错误 255

尝试网上说的忽略该报错:

可是连接数据库的时候提示:

Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./installdb line 24.
BEGIN failed--compilation aborted at ./installdb line 24.

问题补充:

DBI和DBD编译问题通过到CPAN官网查阅资料搞定,加装了支持模块:Test-Deep-0.112.tar.gz与Test-Simple-1.001003.tar.gz,新问题出现了:DBI和DBD编译安装都是通过,返回成功,可是在使用他们的时候,居然提示找不到DBI!!!!头疼了:

[root@linux-box2 db]# ./installdb -u ndouser -p ndouser -h localhost -d ndodb


Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./installdb line 24.
BEGIN failed--compilation aborted at ./installdb line 24.

扶苏丶的主页 扶苏丶 | 初学一级 | 园豆:8
提问于:2014-07-28 11:12
< >
分享
所有回答(1)
0

有点复杂~

Paul* | 园豆:163 (初学一级) | 2014-07-28 14:53
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册