Tuesday, May 22, 2012

Install DBD::Oracle in Ubuntu

ERROR

root@bhagwat-desktop: perl Makefile.PL
Using DBI 1.620 (for perl 5.012004 on i686-linux-gnu-thread-multi-64int) installed in /usr/local/lib/perl/5.12.4/auto/DBI/

Configuring DBD::Oracle for perl 5.012004 on linux (i686-linux-gnu-thread-multi-64int)

Remember to actually *READ* the README file! Especially if you have any problems.

Trying to find an ORACLE_HOME
Your LD_LIBRARY_PATH env var is set to ''

      The ORACLE_HOME environment variable is not set and I couldn't guess it.
      It must be set to hold the path to an Oracle installation directory
      on this machine (or a machine with a compatible architecture).
      See the appropriate README file for your OS for more information.
      ABORTED!

Solution


Oracle Instant Client

Download the instant client packages you’ll need. I chose to download the RPMs and convert them to .deb files using alien Oracle also provides .zip files if you don’t want to do it the alien way.
convert rpm into deb package through aliean (apt-get install alien)
aliean oracle-instantclient11.2-basic-xx.x.x.x.x-x.i386.rpm
Above command convert rpm to deb package
install the deb package 
dpkg -i  xxxxx*.deb
 Then type this command at terminal
export ORACLE_HOME=/usr/lib/oracle/11.2/client/
echo $ORACLE_HOME 
create permanent entry with 
vi /etc/profile
ORACLE_HOME=/usr/lib/oracle/11.2/client/
export ORACLE_HOME

 

 Install DBD::Oracle with following command

cpan DBD::Oracle
or 
go to downloaded directory of DBD::Oracle package & run 
perl Makefile.PL
make
make install

No comments:

Post a Comment