Solution for Perl Module DBD::Oracle installation error

In this Solution, we are about too see how to overcome onPerl DB module installation error in an application server.

If we get below error while we install Perl DB module. Follow the below fix.

Below is the error we are facing during installation.

DBD-Oracle-1.74/hints/svr4.pl
DBD-Oracle-1.74/dbdimp.c
DBD-Oracle-1.74/README
CPAN: File::Temp loaded ok (v0.22)

CPAN.pm: Going to build P/PY/PYTHIAN/DBD-Oracle-1.74.tar.gz

Using DBI 1.609 (for perl 5.010001 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/auto/DBI/

Configuring DBD::Oracle for perl 5.010001 on linux (x86_64-linux-thread-multi)

Remember to actually *READ* the README file! Especially if you have any problems.

Trying to find an ORACLE_HOME
Your LD_LIBRARY_PATH env var is set to ''

The ORACLE_HOME environment variable is not set and I couldn't guess it.
It must be set to hold the path to an Oracle installation directory
on this machine (or a machine with a compatible architecture).
See the appropriate README file for your OS for more information.
ABORTED!

Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
Warning (usually harmless): 'YAML' not installed, will not store persistent state
PYTHIAN/DBD-Oracle-1.74.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Could not read '/root/.cpan/build/DBD-Oracle-1.74-qlFuvZ/META.yml'. Falling back to other methods to determine prerequisites
Failed during this command:
PYTHIAN/DBD-Oracle-1.74.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512

The solution as follows:

Set the Library path as shown below.

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/client_1

export LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/client_1/lib:$LD_LIBRARY_PATH

Run the Cpan shell

perl -MCPAN -e shell

Install with required DB module.

cpan> install DBD::Oracle

Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Vms.3pm
Installing /usr/local/share/man/man3/DBD::Oracle.3pm
Installing /usr/local/share/man/man3/DBD::Oracle::Troubleshooting::Win64.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
PYTHIAN/DBD-Oracle-1.74.tar.gz
/usr/bin/make install -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state.

We have done with Perl module installation.

Exit mobile version