On 06/12/10 20:32, Alexander Farber wrote: > Hello, > > I have installed the following packages: > > oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm > oracle-instantclient11.2-devel-11.2.0.2.0.x86_64.rpm > oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm > > on my CentOS 5.5 Linux / 64 bit with perl 5.8.8 > and have set the following env. variables: > > export TNS_ADMIN=/etc > export ORACLE_HOME=/usr/lib/oracle/11.2 > export LD_LIBRARY_PATH=$ORACLE_HOME/client64/lib > PATH=$PATH:$HOME/bin:/sbin:$ORACLE_HOME/client64/bin > > After that I'm able to access the remote Oracle database > through sqlplus shell and PHP (with: extension=oci8.so) > > Installing DBD::Oracle through CPAN shell fails however > (installing other Perl modules previously has worked well): > > # sudo -E perl -MCPAN -e shell > > cpan shell -- CPAN exploration and modules installation (v1.9402) > Enter 'h' for help. > > cpan[1]> install DBD::Oracle > CPAN: Storable loaded ok (v2.15) > Going to read '/home/afarber/.cpan/Metadata' > Database was generated on Mon, 06 Dec 2010 04:30:56 GMT > Running install for module 'DBD::Oracle' > Running make for T/TI/TIMB/DBD-Oracle-1.26.tar.gz > CPAN: Digest::SHA loaded ok (v5.48) > CPAN: Compress::Zlib loaded ok (v2.03) > Checksum for > /home/afarber/.cpan/sources/authors/id/T/TI/TIMB/DBD-Oracle-1.26.tar.gz > ok > Scanning cache /home/afarber/.cpan/build for sizes > .....................................---------------------------------------DONE
<snipped unpacking> > CPAN: File::Temp loaded ok (v0.22) > CPAN: YAML loaded ok (v0.72) > > CPAN.pm: Going to build T/TI/TIMB/DBD-Oracle-1.26.tar.gz > > Using DBI 1.52 (for perl 5.008008 on x86_64-linux-thread-multi) > installed in > /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/ > > Configuring DBD::Oracle for perl 5.008008 on linux (x86_64-linux-thread-multi) > > Remember to actually *READ* the README file! Especially if you have > any problems. > > The ORACLE_HOME environment variable value (/usr/lib/oracle/11.2) is > not valid. Is /usr/lib/oracle/11.2 where you really unzipped/installed the instant client? because DBD::Oracle does not recognise this path as containing the instant client. > It must be set to hold the path to an Oracle installation directory > on this machine (or a machine with a compatible architecture). > For an Instant Client install, the directory should include an sdk > subdirectory. > See the appropriate README file for your OS for more information. > ABORTED! > Warning: No success on command[/usr/bin/perl Makefile.PL] > TIMB/DBD-Oracle-1.26.tar.gz > /usr/bin/perl Makefile.PL -- NOT OK > Running make test > Make had some problems, won't test > Running make install > Make had some problems, won't install > Failed during this command: > TIMB/DBD-Oracle-1.26.tar.gz : writemakefile NO > '/usr/bin/perl Makefile.PL' returned status 512 > > > The "sdk" subdir mentioned above doesn't really exist in the rpm: > > # rpm -ql oracle-instantclient11.2-devel | grep -i sdk > # > > Thank you > Alex I don't use rpms to install instant client and it works fine. You need the sdk. You could try downloading the zip versions and unzipping them somewhere and point LD_LIBRARY_PATH to the unzip dir - I don't think you need to set ORACLE_HOME with DBD::Oracle and instant client and in some rare cases it actually breaks the install. > # perl -V > Summary of my perl5 (revision 5 version 8 subversion 8) configuration: > Platform: > osname=linux, osvers=2.6.18-53.el5, archname=x86_64-linux-thread-multi > uname='linux builder10.centos.org 2.6.18-53.el5 #1 smp mon nov 12 > 02:14:55 est 2007 x86_64 x86_64 x86_64 gnulinux ' > config_args='-des -Doptimize=-O2 -g -pipe -Wall > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector > --param=ssp-buffer-size=4 -m64 -mtune=generic -Dversion=5.8.8 > -Dmyhostname=localhost -dperladmin=r...@localhost -Dcc=gcc -Dcf_by=Red > Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Dlibpth=/usr/local/lib64 > /lib64 /usr/lib64 -Dprivlib=/usr/lib/perl5/5.8.8 > -Dsitelib=/usr/lib/perl5/site_perl/5.8.8 > -Dvendorlib=/usr/lib/perl5/vendor_perl/5.8.8 > -Darchlib=/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi > -Dsitearch=/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi > -Dvendorarch=/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi > -Darchname=x86_64-linux-thread-multi -Dvendorprefix=/usr > -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads > -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm > -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n > -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr > -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto > -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto > -Ud_setservent_r_proto -Dinc_version_list=5.8.7 5.8.6 5.8.5 > -Dscriptdir=/usr/bin' > hint=recommended, useposix=true, d_sigaction=define > usethreads=define use5005threads=undef useithreads=define > usemultiplicity=define > useperlio=define d_sfio=undef uselargefiles=define usesocks=undef > use64bitint=define use64bitall=define uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE > -fno-strict-aliasing -pipe -Wdeclaration-after-statement > -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > -I/usr/include/gdbm', > optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic', > cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe > -Wdeclaration-after-statement -I/usr/local/include > -I/usr/include/gdbm' > ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-48)', > gccosandvers='' > intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 > ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=8 > alignbytes=8, prototype=define > Linker and Libraries: > ld='gcc', ldflags ='' > libpth=/usr/local/lib64 /lib64 /usr/lib64 > libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc > perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc > libc=, so=so, useshrplib=true, libperl=libperl.so > gnulibc_version='2.5' > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E > -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE' > cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector > --param=ssp-buffer-size=4 -m64 -mtune=generic' > > > Characteristics of this binary (from libperl): > Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT > PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT > USE_ITHREADS USE_LARGE_FILES USE_PERLIO > USE_REENTRANT_API > Built under linux > Compiled at Sep 28 2010 08:50:01 > @INC: > /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.8 > /usr/lib/perl5/site_perl > /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.8 > /usr/lib/perl5/vendor_perl > /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi > /usr/lib/perl5/5.8.8 > . Martin -- Martin J. Evans Easysoft Limited http://www.easysoft.com