Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Perl - Oracle Connectivity

by Tux (Monsignor)
on Jun 25, 2013 at 09:34 UTC ( #1040569=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Perl - Oracle Connectivity
in thread Perl - Oracle Connectivity

Do your Oracle libs, your DBD::Oracle objects and the perl you use all have the same architecture? Like when using 64bit objects, you will need a 64bit perl:

$ file /opt/oracle/app/oracle/product/10g/perl/lib/site_perl/5.8.3/i68 +6-linux-thread-multi/auto/DBD/Oracle/Oracle.so $ file /opt/oracle/11g/perl/lib/site_perl/5.8.3/i686-linux-thread-mult +i/auto/DBD/Oracle/Oracle.so $ file `which perl` $ perl -v examples 64bit system: $ locate Oracle.so | xargs file /pro/3gl/CPAN/DBD-Oracle-svn/blib/arch/auto/DBD/Oracle/Oracle.so: + ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamica +lly linked, BuildID[sha1]=0x634e4eeda1913e3bcc82e83683476ddf93e2d68b, + not stripped /pro/lib/perl5/site_perl/5.14.1/x86_64-linux-ld/auto/DBD/Oracle/Oracle +.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamica +lly linked, BuildID[sha1]=0x672b28a177525e87ea79511e7308a00a4253a3b1, + not stripped /pro/lib/perl5/site_perl/5.16.2/x86_64-linux-ld/auto/DBD/Oracle/Oracle +.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamica +lly linked, BuildID[sha1]=0x9b78d14ec3db186add1217b873eb6e0e244b15d8, + not stripped $ file `which perl` /pro/bin/perl5.16.2: ELF 64-bit LSB executable, x86-64, version 1 (SYS +V), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, Buil +dID[sha1]=0x6141d33c4fed73f117265c8980077086a63f4ea9, not stripped $ ldd /pro/lib/perl5/site_perl/5.16.2/x86_64-linux-ld/auto/DBD/Oracle/ +Oracle.so linux-vdso.so.1 (0x00007fff58bff000) libocci.so.11.1 => /usr/lib/oracle/11.2/client64/lib/libocci.s +o.11.1 (0x00007f7cca5da000) libclntsh.so.11.1 => /usr/lib/oracle/11.2/client64/lib/libclnt +sh.so.11.1 (0x00007f7cc7d48000) libpthread.so.0 => /lib/../lib64/libpthread.so.0 (0x00007f7cc7 +b2c000) libc.so.6 => /lib/../lib64/libc.so.6 (0x00007f7cc7787000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f7cc745500 +0) libm.so.6 => /lib64/libm.so.6 (0x00007f7cc715e000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f7cc6f48000) libnnz11.so => not found libdl.so.2 => /lib64/libdl.so.2 (0x00007f7cc6d43000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f7cc6b2b000) libaio.so.1 => /lib64/libaio.so.1 (0x00007f7cc6928000) /lib64/ld-linux-x86-64.so.2 (0x00007f7ccaa6d000) $ file /usr/lib/oracle/11.2/client64/lib/libocci.so /usr/lib/oracle/11.2/client64/lib/libocci.so: symbolic link to `libocc +i.so.11.1' 32bit system: $ locate Oracle.so | xargs file /pro/lib/perl5/site_perl/5.10.0/i686-linux-64int/auto/DBD/Oracle/Oracl +e.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), + dynamically linked, not stripped /pro/lib/perl5/site_perl/5.12.2/i686-linux-64int-ld/auto/DBD/Oracle/Or +acle.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), + dynamically linked, BuildID[sha1]=0xffc084157f97d79089c90edc0a6ad681 +bf13cca2, not stripped /pro/lib/perl5/site_perl/5.14.1/i686-linux-64int-ld/auto/DBD/Oracle/Or +acle.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), + dynamically linked, BuildID[sha1]=0x4acbc12ed8f3024310e8b4d43003e05e +8262f98d, not stripped /pro/lib/perl5/site_perl/5.16.3/i686-linux-64int/auto/DBD/Oracle/Oracl +e.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), + dynamically linked, BuildID[sha1]=0x3de5f5ea3f207001b31657f00b5dfc73 +59a072da, not stripped /pro/lib/perl5/site_perl/5.18.0/i686-linux-64int-ld/auto/DBD/Oracle/Or +acle.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), + dynamically linked, BuildID[sha1]=0xf68f6a584bf07363d640c8c7a8b7a093 +e987cbd9, not stripped $ file `which perl` /pro/bin/perl5.18.0: ELF 32-bit LSB executable, Intel 80386, version 1 + (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, + BuildID[sha1]=0xf4d0718a75c0dbe0d874f0575a4e415a1e6ad96c, not stripp +ed $ ldd /pro/lib/perl5/site_perl/5.18.0/i686-linux-64int-ld/auto/DBD/Or +acle/Oracle.so linux-gate.so.1 (0xb7791000) libocci.so.11.1 => /usr/lib/oracle/11.2/client/lib/libocci.so. +11.1 (0xb7605000) libclntsh.so.11.1 => /usr/lib/oracle/11.2/client/lib/libclntsh +.so.11.1 (0xb560b000) libpthread.so.0 => /lib/libpthread.so.0 (0xb55b7000) libc.so.6 => /lib/libc.so.6 (0xb543d000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb5350000) libm.so.6 => /lib/libm.so.6 (0xb530e000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb52f0000) libnnz11.so => not found libdl.so.2 => /lib/libdl.so.2 (0xb52eb000) libnsl.so.1 => /lib/libnsl.so.1 (0xb52d1000) libaio.so.1 => /lib/libaio.so.1 (0xb52ce000) /lib/ld-linux.so.2 (0xb7792000) $ file /usr/lib/oracle/11.2/client/lib/libocci.so.11.1 /usr/lib/oracle/11.2/client/lib/libocci.so.11.1: ELF 32-bit LSB shared + object, Intel 80386, version 1 (SYSV), dynamically linked, not strip +ped

Enjoy, Have FUN! H.Merijn


Comment on Re^3: Perl - Oracle Connectivity
Download Code
Re^4: Perl - Oracle Connectivity
by arvind_hotdog (Initiate) on Jun 25, 2013 at 16:02 UTC
    Hi,

    When i do file `which perl` in my production box i get the following   /usr/bin/perl: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

    Similarly when I do locate Oracle.so | xargs file in my production box , i get the following

    /opt/oracle/app/oracle/product/10g/perl/lib/site_perl/5.8.3/i686-linux +-thread-multi/auto/DBD/Oracle/Oracle.so: ELF 32-bit LSB shared object +, Intel 80386, version 1 (SYSV), not stripped

    Thanks

      They obviously do not match, ergo, DBD::Oracle won't load. Period.

      Two approaches:

      1. Install a 32bit perl somewhere else
      2. Install a 64bit DBD::Oracle

      I'd choose the easy solution if possible:

      $ sudo cpan DBD::Oracle

      Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1040569]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2015-07-04 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls