Installing DBD::Oracle on RHEL6 with Oracle Instant Client 11.2 rpm

To install the Perl DBD::Oracle module on RHEL6, with the oracle instant client rpms installed, you need to type the following sequence of commands. Keep in mind that 11.2 can be exchanged for your version of Oracle, and that client64 can be exchanged for just client if you are using 32bit linux. From a shell prompt as root (or using sudo):

install DBD::Oracle

This will likely fail but leave you with a cpan prompt.  When it does, type:

look DBD::Oracle

export ORACLE_HOME=/usr/lib/oracle/11.2/client64/lib

The above will drop you at a shell prompt at the directory where the DBD::Oracle source code has been extracted, and configures the environment for the compile/install. Now you can do the compile and install process with:

perl Makefile.PL -V 11.2

If all is good, then you can go ahead and do the install:

sudo make install

The LD_LIBRARY_PATH environment variable must be set as given above for any user who will be using DBD::Oracle, so be sure to set the path permanently through a simple script added to the /etc/profile.d directory.


2 thoughts on “Installing DBD::Oracle on RHEL6 with Oracle Instant Client 11.2 rpm

Add yours

  1. Not sure if it’s clear, but I do believe you need to have the SDK installed for this to work. The basic client did not appear to be enough.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

Up ↑

%d bloggers like this: