Link to home
Start Free TrialLog in
Avatar of Tbone3434
Tbone3434

asked on

Perl DBD - Can't locate loadable object for module DBD::Oracle in @INC

Hello,

I am trying to get DBD-Oracle-1.3.4 up and running on RHEL 5.  I did see similar posts regarding this however it appears they were for windows.

I have DBI 1.52 installed along with Oracle instant Client and I am able to connect via a PHP script and also via sqlplus so I know client is installed ok.  I have set the environmental variables in my .profile as follows:

export ORACLE_HOME=/usr/lib/oracle/11.2/client64
export TNS_ADMIN=/usr/lib/oracle/11.2/client64/network/admin
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib

Here are the steps I took:
I extracted DBD-Oracle-1.3.4
I ran perl Makefile.PL INSTALLBASE=/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
make
make install

After the install is done I run this command to validate version:
 perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,"\n";'
which returns this:

Can't locate loadable object for module DBD::Oracle in @INC (@INC contains: /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 .) at -e line 1
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

Any idea on this?  I really appreciate the help as i have been trying for quite some time to get this resolved.  Thanks!
Avatar of farzanj
farzanj
Flag of Canada image

You do not appear to have Perl module installed for Oracle.

You can use cpan and install it

Example:

> sudo cpan
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.

cpan[1]> h

Display Information                                                (ver 1.9800)
 command  argument          description
 a,b,d,m  WORD or /REGEXP/  about authors, bundles, distributions, modules
 i        WORD or /REGEXP/  about any of the above
 ls       AUTHOR or GLOB    about files in the author's directory
    (with WORD being a module, bundle or author name or a distribution
    name of the form AUTHOR/DISTRIBUTION)

Download, Test, Make, Install...
 get      download                     clean    make clean
 make     make (implies get)           look     open subshell in dist directory
 test     make test (implies make)     readme   display these README files
 install  make install (implies test)  perldoc  display POD documentation

Upgrade
 r        WORDs or /REGEXP/ or NONE    report updates for some/matching/all modules
 upgrade  WORDs or /REGEXP/ or NONE    upgrade some/matching/all modules

Pragmas
 force  CMD    try hard to do command  fforce CMD    try harder
 notest CMD    skip testing

Other
 h,?           display this menu       ! perl-code   eval a perl command
 o conf [opt]  set and query options   q             quit the cpan shell
 reload cpan   load CPAN.pm again      reload index  load newer indices
 autobundle    Snapshot                recent        latest CPAN uploads
cpan[2]>
Avatar of Tbone3434
Tbone3434

ASKER

Thanks Farzani but I must admint I am a bit confused... Isn't DBD-Oracle the Perl module for Oracle in which case I have already installed it in this directory:

/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle.pm

Thanks!
SOLUTION
Avatar of johnsone
johnsone
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
When you build the module, did you do a 'make test' before you did a 'make install'?
Thanks guys, I added a couple paths to INC and that fixed it.
Glad to help