Could someone guide me how to install the Perl DBD::Oracle
module?
Here is what I have done so far:
$ORACLE_HOME
and $LD_LIBRARY_PATH
Then when I do perl Makefile.pl
it fails with the following error:
I'm having trouble finding your Oracle version number... trying harder WARNING: I could not determine Oracle client version so I'll just default to version 8.0.0.0. Some features of DBD::Oracle may not work. Oracle version based logic in Makefile.PL may produce erroneous results. You can use "perl Makefile.PL -V X.Y.Z" to specify a your client version. Oracle version 8.0.0.0 (8.0) DBD::Oracle no longer supports Oracle client versions before 9.2 Try a version before 1.25 for 9 and 1.18 for 8! at Makefile.PL line 271.
The instant client version: 11.1.0
DBD::Oracle
version is 1.44If you have installed successfully with the Oracle instant client, then could you please let me know what am I missing?
Is it possible to install DBD::Oracle
without using the Oracle instant client?
DBI isn't in your @INC path, which tells perl where to look for custom modules. This is probably because you've installed them using the cpan tool as a non-root user, which won't have write access to the default include paths. You will need to locate DBI.pm and other packages, and move them into your @INC path.
Perl is a powerful scripting language that supports Oracle integration and is available on almost all operating systems. It is also included with the Oracle 10g and Oracle 11g database server.
sudo yum install perl-ExtUtils-MakeMaker
)$ 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 your PATH
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With