Linux下安装DBI和DBD

*** Your LANG environment variable is set to 'en_US.UTF-8'
*** This may cause problems for some perl installations.
*** If you get test failures, please try again with LANG unset.
*** If that then works, please email [email protected] with details
*** including the output of 'perl -V'

If you encounter any problem, a collection of troubleshooting
guides are available under lib/DBD/Oracle/Troubleshooting.
'DBD::Oracle::Troubleshooting' is the general troubleshooting
guide, while platform-specific troubleshooting hints
live in their labelled sub-document (e.g., Win32
hints are gathered in 'lib/DBD/Oracle/Troubleshooting/Win32.pod').

Installing on a linux, Ver#2.6
Using Oracle in /u01/oracle/product/10.2.0/db_1
DEFINE _SQLPLUS_RELEASE = "1002000500" (CHAR)
Oracle version 10.2.0.5 (10.2)
Found direct-link candidates: libclntsh.so
Oracle sysliblist: -ldl -lm -lpthread -lnsl -lirc
Found header files in /u01/oracle/product/10.2.0/db_1/rdbms/public.
Your LD_LIBRARY_PATH env var is set to '/u01/oracle/product/10.2.0/db_1/lib:/lib:/usr/lib:/usr/local/lib'

client_version=10.2


DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"10.2.0.5\" -DORA_OCI_102


Checking for functioning wait.ph

Checking if your kit is complete...
Looks good
LD_RUN_PATH=/u01/oracle/product/10.2.0/db_1/lib
Using DBD::Oracle 1.75_2.
Using DBD::Oracle 1.75_2.
Using DBI 1.633 (for perl 5.010001 on i386-linux-thread-multi) installed in /usr/local/lib/perl5/auto/DBI/
Writing Makefile for DBD::Oracle
[root@ora10g DBD-Oracle-1.75_2]#make
[root@ora10g DBD-Oracle-1.75_2]# make test
Result: FAIL
Failed 38/38 test programs. 0/0 subtests failed.

make: *** [test_dynamic] Error 2
[root@ora10g DBD-Oracle-1.75_2]# make install
[root@ora10g ~]# cd perl_script/
[root@ora10g perl_script]# cat list.pl
#!/usr/bin/perl
use strict;
use ExtUtils::Installed;
my $inst= ExtUtils::Installed->new();
my @modules = $inst->modules();
foreach(@modules)
{
        my $ver = $inst->version($_) || "???";
        printf("%-12s --  %s\n", $_, $ver); 
}
exit;
[root@ora10g perl_script]# ./list.pl
DBD::Oracle  --  1.75_2
DBI          --  1.633
Perl        --  5.10.1
说明DBI和DBD已经安装好了。

Oracle11g下安装DBD
1.安装linux_11gR2_examples软件包
2.设置环境变量
3.安装DBD::Oracle
4.检查安装

猜你喜欢

转载自www.linuxidc.com/Linux/2016-01/127593.htm