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/oracl e/11.2/cli ent64
export TNS_ADMIN=/usr/lib/oracle/ 11.2/clien t64/networ k/admin
export LD_LIBRARY_PATH=/usr/lib/o racle/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/per l5/site_pe rl/5.8.8/x 86_64-linu x-thread-m ulti
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-mul ti /usr/lib/perl5/site_perl/5 .8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_pe rl/5.8.8/x 86_64-linu x-thread-m ulti /usr/lib/perl5/vendor_perl /5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86 _64-linux- thread-mul ti /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!
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/oracl
export TNS_ADMIN=/usr/lib/oracle/
export LD_LIBRARY_PATH=/usr/lib/o
Here are the steps I took:
I extracted DBD-Oracle-1.3.4
I ran perl Makefile.PL INSTALLBASE=/usr/lib64/per
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
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!
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-mul ti/lib/per l5/x86_64- linux-thre ad-multi/D BD/Oracle. pm
Thanks!
/usr/lib64/perl5/site_perl
Thanks!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When you build the module, did you do a 'make test' before you did a 'make install'?
ASKER
Thanks guys, I added a couple paths to INC and that fixed it.
Glad to help
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]>