Making Ubuntu play nice with libdbd-oracle-perl
I started working on some new perl scripts and realized that i have not installed the libdbd-oracle-perl package on my desktop since the upgrade. If anyone is looking for how to do this on a Ubuntu Maverick machine ( I know, right before 11.04 comes out but it still worked in the alpha ).
First go to Oracle’s website and grab the rpm instant-client packages for the database that you are going to be connecting to and convert them to .deb before installing them. This needs to be done or building libdbd-oracle-perl will fail. Save these off to a temp directory that we will be using for this build:
mkdir -p ~/src/libdbd-oracle-perl cd ~/src/libdbd-oracle-perl sudo alien oracle-instantclient-devel-10.2.0.4-1.x86_64.rpm sudo alien oracle-instantclient-basic-10.2.0.4-1.x86_64.rpm sudo alien oracle-instantclient-sqlplus-10.2.0.4-1.x86_64.rpm sudo dpkg -i oracle-instantclient-*.deb
Download the latest source packages from launchpad here or if your lucky you can use apt-get source from the ~/src/libdbd-oracle-perl directory:
apt-get source libdbd-oracle-perl
Either way you get them, you will end up with these three packages:
libdbd-oracle-perl_1.21.orig.tar.gz libdbd-oracle-perl_1.21-2.diff.gz libdbd-oracle-perl_1.21-2.dsc
Next, install some package building tools:
sudo apt-get install build-essential fakeroot dpkg-dev alien
Finally build us a .deb of libdbd-oracle-perl:
dpkg -i libdbd-oracle-perl_1.21-3_amd64.deb
If you want to test to see that it has registered you can run this:
#!/usr/bin/env perl use DBD::Oracle; print $DBD::Oracle::VERSION,"\n";'
Comments are closed.