mukkollu has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am trying to install DBD::Oracle on Linux server with oracle instant clinet and sdk installed, but it throws the below error...I have installed DBI before. In file included from Oracle.xs:1: Oracle.h:37:17: error: oci.h: No such file or directory Oracle.h:38:22: error: oratypes.h: No such file or directory Oracle.h:39:20: error: ocidfn.h: No such file or directory Oracle.h:40:18: error: orid.h: No such file or directory Oracle.h:41:17: error: ori.h: No such file or directory ORACLE_HOME=/opt/sunny/instantclient_10_2 All the libraries are located in ORACLE_HOME. SDK is installed in /opt/sunny/instantclient_10_2/sdk. This directory has include directory which has all the oci headers. LD_LIBRARY_PATH has ORACLE_HOME in it. How can I fix this? Thanks, Sunil
  • Comment on DBD::Oracle installation fails on Linux with Oracle 10.2 instant client

Replies are listed 'Best First'.
Re: DBD::Oracle installation fails on Linux with Oracle 10.2 instant client
by duckyd (Hermit) on Mar 17, 2010 at 18:48 UTC
    not sure if it's your problem, but LD_LIBRARY_PATH generally needs $ORACLE_HOME/lib in it, *not* $ORACLE_HOME
Re: DBD::Oracle installation fails on Linux with Oracle 10.2 instant client
by mje (Curate) on Mar 18, 2010 at 16:40 UTC

    With instant client you can run into problems if you set ORACLE_HOME so don't. Just set LD_LIBRARY_PATH to the path to where you installed instant client. e.g., I installed instant client in /home/martin/instantclient_11_1 (which is a dir created by unzipping sdk, sqlplus and basic zip files). The I set LD_LIBRARY_PATH to /home/martin/instantclient_11_1 and export it:

    export LD_LIBRARY_PATH=/home/martin/instantclient_11_1:$LD_LIBRARY_PAT +H

    NOTE you really should install the sqlplus package too because a) you can check you can access oracle first before playing with perl and b) DBD::Oracle uses sqlplus (if it exists) to work out your oracle version.

    So /home/martin/instantclient_11_1 contains:

    adrci libclntsh.so libociei.so ojdbc5.jar SQLPLUS_ +README BASIC_README libclntsh.so.11.1 libocijdbc11.so ojdbc6.jar genezi libnnz11.so libsqlplusic.so sdk glogin.sql libocci.so.11.1 libsqlplus.so sqlplus

    and the first part of running Makefile.PL should show something like:

    ~/svn/dbd-oracle/trunk$ perl Makefile.PL Using DBI 1.611 (for perl 5.010000 on i486-linux-gnu-thread-multi) ins +talled in /usr/local/lib/perl/5.10.0/auto/DBI/ Configuring DBD::Oracle for perl 5.010000 on linux (i486-linux-gnu-thr +ead-multi) Remember to actually *READ* the README file! Especially if you have an +y problems. Trying to find an ORACLE_HOME Your LD_LIBRARY_PATH env var is set to '/home/martin/instantclient_11_ +1/' Found /home/martin/instantclient_11_1/ WARNING: Setting ORACLE_HOME env var to /home/martin/instantclient_11_ +1/ for you. WARNING: If these tests fail you may have to set ORACLE_HOME yourself! Installing on a linux, Ver#2.6 Using Oracle in /home/martin/instantclient_11_1/ DEFINE _SQLPLUS_RELEASE = "1101000600" (CHAR) Oracle version 11.1.0.6 (11.1) Looks like an Instant Client installation, okay Your LD_LIBRARY_PATH env var is set to '/home/martin/instantclient_11_ +1/' Oracle sysliblist: Found header files in /home/martin/instantclient_11_1//sdk/include. Checking for functioning wait.ph . . .
Re: DBD::Oracle installation fails on Linux with Oracle 10.2 instant client
by sierpinski (Chaplain) on Mar 17, 2010 at 16:00 UTC
    Can you post some code? Where is your Oracle install located?
      We can't even begin to try to help you if you don't post us any code. What are you executing to give you that message?

      Also, please see the nodes about how to post properly, because if you don't use any markup (basic P and BR html tags go a long way,
      also the <code> tag for posting code or error messages.
      Your post as it is now is very difficult to read.