安装DBD::ORALCE模块时报错:
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so
-L/home/oracle/app/oracle/product/11.2.0/client_1/lib/ -lclntsh -ldl -lm -lpthread -lnsl -lirc -lipgo -ldl -lm
/usr/bin/ld: skipping incompatible /home/oracle/app/oracle/product/11.2.0/client_1/lib//libclntsh.so when searching for -lclntsh
/usr/bin/ld: cannot find -lclntsh
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so
-L/home/oracle/app/oracle/product/11.2.0/client_1/lib/ -lclntsh -ldl -lm -lpthread -lnsl -lirc -lipgo -ldl -lm
/usr/bin/ld: skipping incompatible /home/oracle/app/oracle/product/11.2.0/client_1/lib//libclntsh.so when searching for -lclntsh
/usr/bin/ld: cannot find -lclntsh
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1
判定应当是ORACLE客户端库文件libclntsh.so有问题于是决定重新安装oracle客户端。选择instantclient-basic-linux.x64-11.2.0.4.0.zip
当前操作系统是64位Red Hat Enterprise Linux Server release 5.5 (Tikanga) 系统,安装过程中需要安装如下依赖包(i386.rpmx86_64.rpm都要安装),否则会报错。
compat-libstdc++-33-3.2.3-61.i386.rpm
elfutils-libelf-devel-0.137-3.el5.i386.rpm
libaio-devel-0.3.106-5.i386.rpm
elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
sysstat-7.0.2-3.el5.i386.rpm
libaio-devel-0.3.106-3.2.x86_64.rpm
unixODBC-2.2.11-10.el5.x86_64.rpm
unixODBC-devel-2.2.11-10.el5.x86_64.rpm
unixODBC-libs-2.2.11-10.el5.x86_64.rpm
unixODBC-2.2.11-10.el5.src.rpm
libaio-devel-0.3.106-5.x86_64.rpm
unixODBC-2.2.11-10.el5.i386.rpm
unixODBC-libs-2.2.11-10.el5.i386.rpm
安装成功客户端后再重新安装perl DBD::ORACLE模块,成功。