Installing the DBD::Oracle perl module
From Labrats.us
Jump to navigationJump to searchSometimes the following error occurs while attempting to install DBD::Oracle
Unable to locate an oracle.mk or other suitable *.mk
file in your Oracle installation. (I looked in /usr/lib/oracle....)
The oracle.mk (or demo_rdbms.mk) file is part of the Oracle
RDBMS product. You need to build DBD::Oracle on a
system which has one of these Oracle components installed.
(Other *.mk files such as the env_*.mk files will not work.)
Alternatively you can use Oracle Instant Client.
In the unlikely event that a suitable *.mk file is installed
somewhere non-standard you can specify where it is using the -m option:
perl Makefile.PL -m /path/to/your.mk
Most likely there are no *.mk files anywhere on the system. Don't waste time scrounging for one. It won't help anyway. The error message is itself erroneous.
You should be able to get the module installed by doing the following (skipping any steps that you've already done):
- Exit the cpan shell
- Download the version 11.2 "basic" and "devel" instant client rpms from the oracle web site for your machine architecture.
- Become root
- rpm -i oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm (for 64-bit architecture)
- rpm -i oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm (for 64-bit architecture)
- export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
- export ORACLE_HOME=/usr/lib/oracle/11.2/client64
- find and cd into the .cpan build directory. (probably, but not always, /root/.cpan/build)
- cd into the DBD-Oracle directory (will look something like: DBD-Oracle-1.66-4qqv8i)
- perl Makefile.PL -V 11.2
- make
- make install