Installing DBD::Oracle in Perl


Installing DBD::Oracle seems easy.

I still have to use it properly though, so I might be deluding myself.

Anyway, back to the installation: some libraries and associated header files will be needed. Thankfully, they are both available as part of the Instant Client.

The main entry point is the download page, I followed the link for the Linux x86-64 (64-bit) version (I hope these links will survive the test of time!) and proceeded to download two files:


# Basic Package (ZIP)
curl -LO ''

# SDK Package (ZIP)
curl -LO ''

Both archives (which should refer to the same version if they are downloaded at the same time) should be extracted in the same directory. Example:

# Extract the basic package

# Extract the addiitonal header files

At this point, we’re left with a sub-directory (something like instantclient_21_4, the actual name will change in time as the package is updated) with everything needed inside. Let’s set it in the ORACLE_HOME environment variable then:

export ORACLE_HOME="$PWD/instantclient_21_4"

We are now ready to install DBD::Oracle, e.g. like this:

printf %s\\n "requires 'DBD::Oracle';" >> cpanfile


See Installing Perl Modules for the details and other alternatives.

That’s all folks!

Comments? Octodon, , GitHub, Reddit, or drop me a line!