Installing the DBI and DBD::Oracle Perl modules on AIX 5.3


The version of Perl supplied with AIX was built using a the cc_r compiler. Installing Perl modules on AIX requires the original compiler that Perl was built with in this case cc_r. Unfortunately a native compiler is not included as standard in AIX and is a chargeable option. The work around for this is to build a new version of Perl using the GNU compiler gcc allowing the additional Perl modules to be installed.

Installing bos.adt.libm

Before we install gcc and start to compile Perl check that the bos.adt.libm fileset is installed by typing the following.

lslpp -l | grep libm

lslpp -l | grep libm
  bos.adt.libm      COMMITTED  Base Application Development
  bos.adt.libmio     COMMITTED  Modular IO Library

If the bos.adt.libm fileset is not displayed then it will need to be installed from (in this case) the AIX 5.3 TL05 installation CD or nim server.

I installed the Base Application Development fileset which included bos.adt.libm.

I copied the following files from a nim server to the computer that requires the Perl module. (These two computers were on separate networks.)



These files I placed in an empty directory I had just created on a filesystem with enough space, in this case /tmp/adt.

To install, either use the installp command or smitty. I chose smitty as can be seen below.

smitty installp

                               Install Software

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
* INPUT device / directory for software               /tmp/adt
* SOFTWARE to install                                [_all_latest]                                                        
  PREVIEW only? (install operation will NOT occur)    no                                                                  
  COMMIT software updates?                            yes                                                                 
  SAVE replaced files?                                yes                                                                  
  AUTOMATICALLY install requisite software?           yes                                                                 
  EXTEND file systems if space needed?                yes                                                                 
  OVERWRITE same or newer versions?                   no                                                                  
  VERIFY install and check file sizes?                no                                                                  
  Include corresponding LANGUAGE filesets?            yes                                                                 
  DETAILED output?                                    no                                                                  
  Process multiple volumes?                           yes                                                                 
  ACCEPT new license agreements?                      no                                                                  
  Preview new LICENSE agreements?                     no  

Fill in the fields similar to the above and press the return key. The adt filesets should install, check the output for errors.

If the installation completed without errors check that the bos.adt.libm fileset is now installed by typing the following.

lslpp -l | grep libm

Installing gcc

Check if gcc is already installed by typing the following.

rpm -qa | grep gcc

If nothing is returned then continue to install gcc.

gcc rpm packages can be found on the following web page.

Download the relevant packages and install as follows ensuring to substitute the package files below with the ones you downloaded.

rpm -ivh gcc-

rpm -ivh libgcc-

rpm -ivh libstdc++-

Installing perl

1. Download the perl source tar.gz file from i.e. perl-5.10.1.tar.gz

2. Copy the file to the destination computer and type the following to unzip the file.

gunzip perl-5.10.1.tar.gz

3. Then type the following to untar the file.

tar xvf perl-5.10.1.tar

4. For the DBD::Oracle perl module to work we need to compile a 64 bit version of perl.

cd into the newly extracted perl directory and type the following commands.

export OBJECT_MODE=64 

    ./Configure \
    -d \
    -Dcc='gcc -maix64' \
    -Duseshrplib \
    -Duse64bitall \

The -Dprefix option will install Perl in a directory parallel to the IBM AIX system Perl installation.


make test

Check for errors

make install

5. Verify the installation completed

/usr/opt/perl5_64/bin/perl -v

This is perl, v5.10.1 (*) built for aix-64all

Installing the DBI perl module

Type the following to unpack the file.

tar xvf DBI-1.608.tar

cd DBI-1.608

/usr/opt/perl5_64/bin/perl Makefile.PL (ensure you use the newly compiled perl here)


make test

Check for errors

make install

To test if the DBI module is installed run the following command.

perl -e 'use DBI;'

If this command returns nothing then DBI is installed. If DBI is not installed it will throw an error.

Installing the Oracle client

Download the following packages "Instant Client Package - Basic", "Instant Client Package - SQL*Plus", and "Instant Client Package - SDK" from the Oracle web site link below.

I chose version but later versions may also work.

Copy the downloaded zip files to the AIX server and unzip in a newly created directory called "instantclient"

Installing the DBD::Oracle module

1. Download the DBD::Oracle module from the cpan website, link below.

2. Copy to the AIX server, and unzip by typing the following.

gunzip DBD-Oracle-1.24a.tar.gz

3. Then type the following to untar the file.

tar xvf DBD-Oracle-1.24a.tar

4. cd into the newly extracted DBD-Oracle-1.24 directory and set the following variables ensuring to modify the ORACLE_HOME directory to reflect where you created the "instantclient" directory.

export ORACLE_HOME=/usr/local/oracle/instantclient


Then type the following.

/usr/opt/perl5_64/bin/perl Makefile.PL


make test

Check for errors

make install