• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1454
  • Last Modified:

Oracle Module Error - AIX

I have installed DBD::Oracle  Perl module on AIX 5.3 TL11. I see that I have no issues compiling this module but when I plan to use the module, here is the error

$ cat Oracle_loadid.err
Can't load '/usr/opt/perl5/lib64/site_perl/5.8.8/aix-thread-multi-64all/auto/DBD/Oracle/Oracle.so' for module DBD: racle:      0509-022 Cannot load module /usr/opt/perl5/lib64/site_perl/5.8.8/aix-thread-multi-64all/auto/DBD/Oracle/Oracle.so.
        0509-150   Dependent module /optware/oracle/product/11.1.0/client_1/lib32/libclntsh.so could not be loaded.
        0509-103   The module has an invalid magic number.
        0509-022 Cannot load module /usr/opt/perl5/lib64/site_perl/5.8.8/aix-thread-multi-64all/auto/DBD/Oracle/Oracle.so.

I have no missing files

$ ls -l /usr/opt/perl5/lib64/site_perl/5.8.8/aix-thread-multi-64all/auto/DBD/Oracle/Oracle.so
-r-xr-xr-x    1 root     system       479114 Feb 08 11:08 /usr/opt/perl5/lib64/site_perl/5.8.8/aix-thread-multi-64all/auto/DBD/Oracle/Oracle.so*

$ ls -l /optware/oracle/product/11.1.0/client_1/lib32/libclntsh.so
-rwxr-xr-x    1 oracle   dba        36972652 Feb 25 2009  /optware/oracle/product/11.1.0/client_1/lib32/libclntsh.so*
0
mnis2008
Asked:
mnis2008
1 Solution
 
woolmilkporcCommented:
Hi again,

obviously your LIBPATH points to the 32-bit version of libclntsh.so (/optware/oracle/product/11.1.0/client_1/lib32/)

Your 64-bit Perl needs the 64-bit version of the Oracle client library.

You must modify LIBPATH to point to /optware/oracle/product/11.1.0/client_1/lib/  

Attention: This might introduce problems if there are 32-bit (non-Perl) applications which need the 32-bit version!

If this is relevant for you you'll need to build a special environment for Perl scripts accessing Oracle (e.g. by sourcing a dedicated initialization file before running the Perl scripts).

wmp
0
 
balasundaram_sCommented:
Or,  you could use PERL5LIB instead of modifying LIBPATH.  
In your case, I think this DBD::oracle perl module needs to be compiled using all 64-bit libraries.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now