- Install if missing ExtUtils-MakeMaker module (
sudo yum install perl-ExtUtils-MakeMaker
) - Install Perl DBI module (
$ yum install perl-DBI
) -
Manually install below three RPMs for Oracle instant client (from Instant Client Downloads for Linux x86-64. The example is for v11.2.0.3.0-1: adapt the commands below to the actual version.)
oracle-instantclient11.2-basic-11.2.0.3.0-1 oracle-instantclient11.2-devel-11.2.0.3.0-1 oracle-instantclient11.2-sqlplus-11.2.0.3.0-1
I am using 64 bit Linux box, so select your RPM filenames accordingly. Something like sudo yum -y install oracle-instantclient*rpm
should do)
-
set below variables:
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib export ORACLE_HOME=/usr/lib/oracle/11.2/client64
MacOS users will need:
DYLD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/
Also add
ORACLE_HOME
to yourPATH
variable. -
download DBD::Oracle from CPAN
-
untar the module and run below commands in given sequence:
perl Makefile.PL make sudo make install
In case you get complaints about missing gcc you can (temporarily) install it and then remove it.
DONE !!!
Issues I had faced were due to the wrong LD_LIBRARY_PATH
. I had set it to /usr/lib/oracle/11.2/client64
whereas the correct value is /usr/lib/oracle/11.2/client64/lib
.
Certainly, this was a great learning for a newbie like me.