wp.jochen.hayek.name/blog-en

Perl’s DBD::Oracle vs Debian

For accessing an Oracle DB server from a client computer (w/o its own Oracle DB server installation) you need “Oracle Instant Client” (a set of packages of installables for various computer architectures, supplied by Oracle for free):

You won’t find Oracle Instant Client for Debian (outside your organisation or company), but …:

I.e. before installing DBD::Oracle these components of Oracle Instant Client must already be installed:

How to install DBD::Oracle?

  1. the “CPAN way” using a C compiler (gcc) etc
  2. as a readymade OS (i.e. Debian) package

Of course there are organisational reasons, that enforce the installation as readymade OS package.

DBD::Oracle for Debian is named libdbd-oracle-perl, here you find for which Debian version it is available and a lot more details:

If you are using a version of Debian like Jessie, that is not listed there, i.e. your version of Debian is not supported, you may want to create your own libdbd-oracle-perl through backporting the Debian Sid “source package components”.

This certainly involves using a C compiler (gcc) etc, but it in the end it creates a Debian package, that you can distribute within your organisation (resp. company).

How to retrieve the source package?

Retrieving the source package, the “dget” approach (preferred): go to the versioned links section, choose the .dsc link for the latest version, use dget on it, as suggested by the hint popping up, while you hover over the .dsc link.

Retrieving the source package, the “if using dget failed” approach: go to the general / source link:

Choose the sid link:

Download the 3 files listed there:

Run this command line on the .dsc file downloaded right before:

$ dpkg-source --extract libdbd-oracle-perl_VERSION.dsc

This created a source tree.

You will now adapt the source tree to your needs (if necessary). Maybe dpkg-buildpackage will make you return to this phase.

Quite possibly you can now just run the next step within that source tree:

$ dpkg-buildpackage --build=any,all --unsigned-source --unsigned-changes

resp.:

$ dpkg-buildpackage -b -us -uc

Congratulations, you created your own libdbd-oracle-perl_*.deb.

Exit mobile version