Install DBD::Oracle and Oracle Instant Client on Ubuntu

Update: If you’re looking for instructions for Ubuntu 12.04 and later, most of the steps below still apply, but there are a few small differences nicely explained by Rob Staveley at http://bimport.blogspot.com.au/2012/05/using-perl-dbi-with-oracle.html

Update 2: It turns out these steps can be used for Cygwin as well. Thanks to Marc for pointing it out.

A couple of weeks few years ago I finally got a new laptop at work – which meant of course that I had to reinstall everything. Although we used Windows XP, there was one app that I had to run through Linux. The solution was VirtualBox running Ubuntu. When I tried to run the app, I realized that I still needed to Install DBD::Oracle and Oracle Instant Client on Ubuntu – which brings me to this article. Nothing better than a reinstall to generate article material 🙂

DBD::Oracle is usually a pain to install if you haven’t already done it a gazillion times. After that, it’s just an annoying itch. In this article I’ll cover installing DBD::Oracle using Oracle Instant Client, Ubuntu 9.04 (at the time – I’ve had reports that this works on 12.04 and up), and Perl 5.10. Since we’re using the Instant Client, you’ll need an Oracle DB you can connect to in order to do the testing. You can choose to skip testing altogether, but you might be into an unpleasant surprise later.

 

DBI and DBD::Oracle

Installing the DBI is always easy – regardless if you’re running Windows or Linux. Just follow the steps.

  1. Get root password if you don’t already have one: sudo passwd root
  2. Switch to root: su -
  3. Run CPAN: perl -MCPAN -e shell
  4. Check if DBI is already installed: m DBI
  5. If it’s not installed, install it: install DBI

That should do the trick for the DBI. The DBD::Oracle is a bit more complicated and we’ll just use CPAN to download it for us. The rest is manual.

  1. Check for DBD::Oracle: m DBD::Oracle
  2. Download it: get DBD::Oracle
  3. Exit CPAN: q

Now we should have the DBD::Oracle distribution downloaded to our CPAN build directory. If you don’t know where to find it, look for .cpan dir under your root home or (if you started CPAN for the first time doing sudo from your main user, look for it under your main user’s home directory). We’ll leave that distro aside for a moment and work on the other pre-requisites.

 

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.

Oracle Instant Client Download Site i386
Oracle Instant Client Download Site AMD64 32- and 64-bit

Accept the license agreement by clicking the Accept radio button. Since the i386 and amd64 files have different names, check the bold words in the file names to know which ones to download (the names below are for the i386 platform). Also, if you don’t have a user_id for Oracle, you’ll be prompted to register one once you click the link. It’s free of charge.

  • oracle-instantclient11.1-basic-xx.x.x.x.x-x.i386.rpm
  • oracle-instantclient11.1-sqlplus-xx.x.x.x.x-x.i386.rpm
  • oracle-instantclient11.1-devel-xx.x.x.x.x-x.i386.rpm

AMD64 has only zip files from what I could find, and they’re named a bit differently, too (remove the 32 for the 64-bit version:

  • instantclient-basic-linuxAMD64-32-xx.x.x.x.x-yyyymmdd.zip
  • instantclient-sqlplus-linuxAMD64-32-xx.x.x.x.x-yyyymmdd.zip
  • instantclient-sdk-linuxAMD64-32-xx.x.x.x.x-yyyymmdd.zip

Note: Extract the zips into a directory called instantclient and skip to the Set Up your Environment Variables section if you’re using the AMD64 or i386 zip files.

Install alien and libaio

Now is the time to install alien, which is an application that converts rpm files into .deb format to be used with dpkg. Instant Client also requires libaio. Both can be installed through the Synaptic Package Manager. Just open it, look for alien, mark it for install and do the same for libaio and libaio-dev. Once they’re installed, you’re good to move on to install the Instant Client. Just don’t forget to exit Synaptic Package Manager, since we’ll be using dpkg and it won’t work if Synaptic is open.

 

 

Install Oracle Instant Client

First step to install Oracle Instant Client from rpm files is to convert them into .deb files. Do that with alien by running the following command (from a command line in the directory where you downloaded your RPMs):

$ sudo alien --scripts *.rpm

It takes a little while to run, so be patient. Once it’s complete, install the newly created .deb files:

$ dpkg -i *.deb

 

Set up your Environment Variables

The nasty thing about rpm files is that it’s not always easy to know where the files were installed. If you opted for the zip file approach, your install will most definitely be different. For RPM install, add this to your .bashrc file (swap xx.x for your oracle version):


export ORACLE_HOME=/usr/lib/oracle/xx.x/client
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Update: If you get an ELFCLASS64 error, try setting LD_LIBRARY_PATH to $ORACLE_HOME/lib32 instead.

Reload your .bashrc file:
$. ~/.bashrc

Note: by default, Oracle Instant Client doesn’t come with a tnsnames.ora file or the directory structure where it’s usually found. We’ll have to create that ourselves –

$ mkdir -p $ORACLE_HOME/network/admin; touch $ORACLE_HOME/network/admin/tnsnames.ora

 

Install DBD::Oracle

It’s time to finally install DBD::Oracle. Go to your CPAN build directory and cd into DBD-Oracle-*. As a user having the environment variable set from the previous section, run Makefile.PL portion.

$ perl Makefile.PL

There’s no need to set INC or LIB with the alien approach, but if you run into any issues, try giving Makefile.PL the path to your include dir for INC, and lib dir for LIB.

Next, run

$ make.

It will raise a few warnings, but unless it exits with an error, you should be OK.

The next logical step is to run make test. However, this will undoubtedly fail unless you have a valid entry in your tnsnames.ora file. If you don’t, you can skip this test and hope that everything works later on. Otherwise, update your tnsnames.ora file with a valid entry, and set one more environment variable before running the test:

$ export ORACLE_USERID="user/[email protected]_entry_name"
$ make test

This is usually the hardest part to pass with total success. Many things can go wrong. In my case, the valid entry I use doesn’t have full grants to the user I log in as. This always triggers an error on the create/access sequences portion of the testing. I simply ignore it nowadays – make sure you analyze your test results thoroughly before choosing to ignore the errors as well.

Now that the testing is over, simply run
$ make install
as a super user and you’re all set!

 

 

75 thoughts on “Install DBD::Oracle and Oracle Instant Client on Ubuntu

  1. Hi,
    I trierd intall DBD::Oracle in UBUNTU,i am getting this error,please help me to solve this problem.

    Thanks!

    Can’t locate cpan.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .).
    BEGIN failed–compilation aborted.

  2. Can I use the same for Ubunutu 8.04 ?
    In the line: export ORACLE_USERID=”user/[email protected]_entry_name”
    What can I put in for example in user/[email protected]_entry_name ? What is the correct TNS ?
    thx for help

    • Can I use the same for Ubunutu 8.04 ?

      I haven’t tested it on 8.04, but it should be pretty much the same thing. You might need to install some extra packages, so be prepared.

      In the line: export ORACLE_USERID=”user/[email protected]_entry_name”
      What can I put in for example in user/[email protected]_entry_name ? What is the correct TNS ?

      In order to do the testing, you should have access to a working database somewhere. In my case, I have a working oracle database running in my local area network. My tnsnames.ora under linux has the entry pointing to it. There is no “correct” TNS – it has to be some database you have access to and can reach from database clients such as Toad.

  3. Hi Vinny,
    thx for the Informations. I want to say the I’am new in that, so sorry for some stupid questions or unclear sentences.
    My Situaion:
    I want to connect from a Ubuntu8.04 with the Perl Modul dbd::oracle to a remote OracleDB which is in den LAN.
    I know from the OracleDB the IP, Port, Username, Password and Databasename.
    I had success to connect to MySQL und Postgre Datebases with the dbd Perl moduls and I thought it is the same easy way to connect to an oracleDB but now I know I have to do a little bit more.
    So my first question is can connect without put someting in in the tnsnames.ora, because I have my Perl file with the content:
    $dbh = DBI->connect(“dbi:Oracle:$MyOracledbname”, $MyOracleuser, $MyOraclepassw);
    or should I create in addition tnsnames.ora with connet: MyOracleuser/[email protected] ?
    Maybe my train of thought is not right.
    thx for help

    • Hey, we all have to start somewhere right? I see where you’re getting confused, so I’ll try to explain and give you a few suggestions to bypass the problem.

      When connecting to an oracle database, you can use 2 different formats of DSN:

      my $dbh = DBI->connect("dbi:Oracle:host=$hostname_or_ip;sid=$oracle_sid;port=$oracle_port",$username,$password);
      or
      my $dbh = DBI->connect("dbi:Oracle:$tns_name_entry",$username,$password);

      The first example performs a direct connection without going through your tnsnames.ora. The second, however, looks into the tnsnames.ora found under $ENV{ORACLE_HOME}/network/admin for the entry and does the connection.

      TNS entries typically look something like this (what you’d have in your tnsnames.ora file) :

      ORCL =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
      )
      )

      In this case, you would use ORCL as $tns_name_entry in your DSN. Of course that will do you no good unless you have an oracle database running under 127.0.0.1 port 1521. So here are the suggestions to try to bypass your issue:

      1) I was going to suggest that you skip $ make test but I suddenly realized that if you want DBD::Oracle installed, it’s because you probably need to connect to an oracle database that is already available to you – check with your DBA to get the TNS entry for the database, add it to your tnsnames.ora and set the following variable before making test:

      $ export ORACLE_USERID="username/[email protected]_ENTRY"

      2) Install an Oracle Express DB in a windows somewhere (express because the install file about 200MB in comparison with the 1.8Gb for the 11g regular install), make sure you have connectivity between your Linux and your Windows and use that as testing DB. I tried installing the regular download on Ubuntu but ran into all sorts of trouble. I’ll add a post on how to install the express edition shortly.

      3) Skip the testing just to get the module installed. This might lead to problems though. For example, in my cygwin I had issues with ORACLE_HOME in the registry when I uninstalled Oracle 8 client to install 9i. It left the registry broken and DBD::Oracle on cygwin wouldn’t work for anything. I had to manually go in there and fix the registry in order to get it to work. Linux doesn’t have such problems, but who knows what other issues you might run into.

      I hope this helps. Good luck and let me know your progress.

  4. It wooooorks, thx Vinny 🙂

    I choose the second example and than it works! But before had no connection because of two (!) Firewalls which blocked Port 1521 (if somebody want to check if a Port ist open, you can use the programm “nmap” and than use the command “nmap -p1521 yourIPyouWish”)
    The TNS entry don’t work but this is not important, because second example is better for me, maybe if I spent some time it will work but I don’t need it until now ( I tried you example tnsnames.ora with my informations).
    Maybe the main Problem for me was that I don’t undestand the sense of TNS and thought this is a necessary configuration to get a connection to an oracle db.
    Here are things for 8.04 LTS which worked in my case, and which differs from vinny manual:
    – instead of ~/.bashrc use the command: source ~/.bashrc
    – instead of libaio use libaio1 (with apt-get install like with alien and libaio-dev I used the command: “apt-get install YourToolYouWish”)
    – I downloaded manualy dbd::odbc1.23, untared it, go in the extracted folder an do it like in vinny’s manual.
    Addional Infos:
    – I use exactly this packages:
    oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm
    oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm
    oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm
    and converted them to deb.

    maybe this informations can help another one

    nice greetings

    ubu

  5. w0w, thankyou for this great tutorial. You have no idea how nice it is. I spent about 2 hrs this morning trying to figure it out, kept getting the home error, then i found your tutorial and it took about < 5 min. This works in Debian – Lenny 😉

  6. I just found this article googling around. It’s been weeks since you posted this article and I wanted to let you know it’s still helping! Let me see what else you’ve been writing…

  7. Cheers mate. That helped me a lot. Just wondering: isn’t it easier to work with the zip files rather than going through all the trouble with the rpm’s ? But then, in the process I learned to know alien. Great job.

    • Koen, thanks for your comment.

      Personally, I like Zip files because I can control where I place the files and stuff, but by using binary package files (RPM/DEB), I can control install/uninstall through Synaptic, although I can’t always easily find where a package was installed. I guess both have their down sides 🙂

  8. Nice write up. It helped me set up DBD on ubuntu 8.04. However
    the make test failed with one test

    t/31lob……………..ok 4/9DBD::Oracle::st execute failed: ORA-24813: cannot send or receive an unsupported LOB (DBD ERROR: OCIStmtExecute) [for Statement “BEGIN ? := DBMS_LOB.GETLENGTH( ? ); END;” with ParamValues: :p1=undef, :p2=OCILobLocatorPtr=SCALAR(0xa45570)] at t/31lob.t line 108.

    and any LOB based transactions get hung. I used the 11.1.0.7.0 client and the server is 11g. Googling this – led me to posts which suggest there might be a problem with this client. the advise was to use
    10.x.x.. client. Anyone see the same behaviour?

    Thanks

  9. Hi Vinny,

    I got stucked where setting up the paths.
    I dont have oracle in my system.
    I dont know how to set remote oracle home in my system.
    Can you tell me That.

    thanks and Regards
    Ratna

    • Hey Ratna,

      I don’t know if it’s possible to set up a remote oracle home. However, the steps before “Set up your Environment Variables” should help you to get an oracle client installed. That way you can access remote databases through tnsnames.ora

      Let me know if you have any trouble with those steps…

      Vinny

  10. Nice post, I am stuck in this installation for one hour, Thanks again …

  11. Hi Vinny,

    This might be silly question.
    Do we need oracle in our system before installing client.

    Thansk and Regards
    Ratna

    • Hi Ratna,

      No, you don’t need Oracle database to install the client. Actually, if you do have the Oracle DB installed, then you probably don’t need the client on that machine.

      Vinny

  12. Hi Vinny,

    Please forget the last reply.
    I understand what is Oracle client.
    Now I installed oracle client using rpm file(converted to debian).
    I set up the envinroment variables properly as you explained.
    When I run perl Makefile.PL in DBD-Oracle-* folder.
    Its giving the following error message.
    Is that means do I need to install oracle in my machine???

    [email protected]:~/.cpan/build/DBD-Oracle-1.23-LomXe3# perl Makefile.PL
    Using DBI 1.609 (for perl 5.010000 on x86_64-linux-gnu-thread-multi) installed in /usr/local/lib/perl/5.10.0/auto/DBI/

    Configuring DBD::Oracle for perl 5.010000 on linux (x86_64-linux-gnu-thread-multi)

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

    The ORACLE_HOME environment variable value (/usr/lib/oracle/10.2.0.3/client) is not valid.
    It must be set to hold the path to an Oracle installation directory
    on this machine (or a machine with a compatible architecture).
    For an Instant Client install, the directory should include an sdk subdirectory.
    See the appropriate README file for your OS for more information.
    ABORTED!

    Thanks and regards
    Ratna

    • Hey Ratna,

      Looks like you don’t have oracle installed under the path in your ORACLE_HOME (/usr/lib/oracle/10.2.0.3/client). Make sure your ORACLE_HOME points to the valid client install path.

      Vinny

  13. Hi Vinny,

    I completed installing oracle client.
    I downloaded zip files and set path to that folder.
    Then it installed properly.

    Thanks and Regards
    Ratna

  14. Vinny

    I’m trying to run a perl script having STAF framework using Perl installed during Oracle installation. But I’m getting an error like
    Data : Can’t locate PLSTAF.pm in @INC (@INC contains: usr/local/staf
    /bin /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/
    perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i38
    6-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr
    /lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.

    I think this is due to some Perl related environment variables set during Oracle installation.

    Any idea which perl related env vars are set during Oracle installation.

    Thanks
    Sandhya

    • Hi Sandhya,

      Perl is complaining that it cannot find PLSTAF.pm in any of the places configured for it to be found. It’s looking for PLSTAF.pm under user/local/staf instead of /user/local/staf (notice the leading slash). Are you adding it by use lib? It doesn’t look like it’s oracle related to me.

  15. Hi Vinny,
    Nice article .I too seem to have run into the same problem that subodh has mentioned .I am trying to install DBD::Oracle and getting the below mentioned error
    t/31lob……………..DBD::Oracle::st execute failed: ORA-24813: cannot send or receive an unsupported LOB (DBD ERROR: OCIStmtExecute) [for Statement “BEGIN ? := DBMS_LOB.GETLENGTH( ? ); END;” with ParamValues: :p1=undef, :p2=OCILobLocatorPtr=SCALAR(0xf3f5fa0)] at t/31lob.t line 108.

    Any feedback would be greatly appreciated.
    Regards
    Paramjit

  16. Paramjit/Subodh,
    I did some digging, and found this post: http://www.nntp.perl.org/group/perl.dbi.users/2009/01/msg33612.html where they discuss the problem. In short – it does seem to be client related and others have said that only the tests have failed – no impact in Production scripts (maybe they weren’t using LOBs??)

    Cheers,
    Vinny

  17. HEllo,
    I work with an Oracle 8i in a machine A.
    I want to access in Perl 5.8.5 from another machine B to this Oracle8i-machine A
    Do I need just DBI and DBD ?
    Do I need Oracle-Client ?
    Regards

    Chris

    • Hi Chris,

      You will need DBI and DBD::Oracle. To be able to build DBD::Oracle, however, you will need an Oracle client. Just make sure you can perform a tnsping on the SID from machine B to machine A to make sure your tnsnames.ora is set up correctly. If you have several machines that you would like to set up (having the same architecture/OS), you could also check out this post to build DBD::Oracle on one machine only and use PAR so you won’t have to rebuild DBD::Oracle on all boxes every time you upgrade your client.

      And speaking of upgrading clients… I strongly recommend that you upgrade your Oracle to at least 9i.

      Cheers,
      Vinny

  18. Hello Vinny,
    Thanks.
    No upgrading in the offing, because it’s existant’s recover.
    Actually, I succeeded with DBI 1.50.
    But now, the install of DBD::Oracle 1.17 doesn’t work ..See
    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.
    I think I can obtain an old client.
    But I don’t know how it works.
    Regards,
    Chris

  19. Chris,
    The DBI usually installs easy – never had any problems with it. The DBD::Oracle, however, is more tricky. Make sure you have an oracle client installed in that box. I’m not sure if 10g or 11g clients will work well with 8i server, but I’m pretty sure that the 9i will do fine. You can download 11g from here, and with some googling you might be able to find legacy clients.

    If you already have a client installed, then make sure you set your environment variables as explained in the tutorial.

    Let me know how it goes.
    Vinny

  20. Hello Vinny,
    Thanks for your answer.
    The problem is, the machine with Perl DBI is a Linux 2.6.9-42.EL x86_64. I can’t find a client8i for such a machine. It seems to recent to work with a client-Oracle8i. It’s not a Solaris nor a HP UX. So, maybe the 9i is OK … or the same problem will arrive ?
    The post ( Oracle WITHOUT having an installed client ) seems about 10g only.

    • Chris,

      Try installing the 11g client on your machine and using sqlplus to connect to the 8i server. If connection works, run some of the select queries you plan on running with perl. If all is good, then install DBD::Oracle against the 11g client. If not, please let me know and I’ll try to get you an 8i.

  21. Hello Vinny,
    I tried to install the 11g client. These are cascading difficulties. The last was to have a GDM Graphic Interface , on the Linux x86_64 which is a virtual machine. I don’t know if I have to work on the screen (console) of the Box. Or just copy some of them. But it’s to hard to deal with. To many files, to many parameters, variables. And I don’t know what I have to do . There is a genezi ( or smtg like that ) file but also a message error about not shared library…
    All this for only use Perl with Oracle ?
    I wish I could copy only a few zip or jar files.

    • Chris,
      Almost all of the steps of the tutorial above are to be run in the command line. If you don’t have a graphical interface to run Synaptic Package Manager, then use apt-get from the command line:

      sudo apt-get install libaio alien

      Where exactly are you getting the errors and what is the error message?

  22. HEllo Vinny,
    I found those 3 zip files :
    oracle-instantclient11.2-basic-11.2.0.0.2-1.x86_64.zip
    oracle-instantclient11.2-sqlplus-11.2.0.0.2-1.x86_64.zip
    oracle-instantclient11.2-devel-11.2.0.0.2-1.x86_64.zip
    They gave a directory
    instantclient_11_2
    with no bin nor lib.
    -rwxrwxr-x 1 root root 25412 avr 25 2009 adrci
    -rw-rw-r– 1 root root 437 avr 25 2009 BASIC_README
    -rwxrwxr-x 1 root root 44827 avr 25 2009 genezi
    -r–r–r– 1 root root 342 avr 25 2009 glogin.sql
    -rwxrwxr-x 1 root root 48090963 avr 25 2009 libclntsh.so.11.1
    -r-xr-xr-x 1 root root 7855714 avr 25 2009 libnnz11.so
    -rwxrwxr-x 1 root root 1260664 avr 25 2009 libocci.so.11.1
    -rwxrwxr-x 1 root root 87843274 avr 25 2009 libociei.so
    -r-xr-xr-x 1 root root 164318 avr 25 2009 libocijdbc11.so
    -r-xr-xr-x 1 root root 1494031 avr 25 2009 libsqlplusic.so
    -r-xr-xr-x 1 root root 1501081 avr 25 2009 libsqlplus.so
    -r–r–r– 1 root root 1982368 avr 25 2009 ojdbc5.jar
    -r–r–r– 1 root root 2096421 avr 25 2009 ojdbc6.jar
    drwxrwxr-x 4 root root 4096 avr 25 2009 sdk
    -r-xr-xr-x 1 root root 9304 avr 25 2009 sqlplus
    -rw-rw-r– 1 root root 441 avr 25 2009 SQLPLUS_README
    -rw-rw-r– 1 root root 37021 avr 25 2009 xstreams.jar

    So what could be my ORACLE_HOME ?

    Regards
    Chris

  23. Hi Vinny,

    Great tutorial, just wanted to let you know that it works Fine on Ubuntu Lenny. I had a pre deployed oracle instant client 11.1.0.7 that was hand rolled and it was just a matter of changing my $ORACLE_HOME path to match

    Thanks heaps, you’ve saved me a load of time 🙂

    • Thanks Geoff,

      It’s good to know that this post is useful! If only people would click on the ads once each time this helped them out :D!

      Vinny

  24. Hi Vinny,

    Thanks for your useful tutorial!
    I followed all your instructions to install DBD:Oracle.
    Nevertheless when I try to run my script I get this error :

    install_driver(Oracle) failed: Can’t locate DBD/Oracle.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at (eval 3) line 3.
    Perhaps the DBD::Oracle perl module hasn’t been fully installed,
    or perhaps the capitalisation of ‘Oracle’ isn’t right.

    Any idea?

    Thank you

    • Hi Carnifex,

      Apparently the module didn’t finish installing. Please post the output of your perl Makefile.PL, make, make test, and make install so I can have a look at where it broke. The capitalizing is correct.

      • Hello Vinny,

        Can you please clarify this ..
        When I executed this perl Makefile.PL

        [email protected]******* DBD-Oracle-1.66 # perl Makefile.PL
        Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/auto/DBI/ at Makefile.PL line 39
        Using DBI 1.615 (for perl 5.010001 on x86_64-linux-thread-multi) installed in /usr/local/lib64/perl5/auto/DBI/

        Configuring DBD::Oracle for perl 5.010001 on linux (x86_64-linux-thread-multi)

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

        Installing on a linux, Ver#2.6
        Using Oracle in /usr/lib/oracle/12.1/client64
        DEFINE _SQLPLUS_RELEASE = “1201000200” (CHAR)
        Oracle version 12.1.0.2 (12.1)
        Looks like an Instant Client installation, okay
        You don’t have a libclntsh.so file, only /usr/lib/oracle/12.1/client64/libclntsh.so /usr/lib/oracle/12.1/client64/libclntsh.so.10.1
        So I’m going to create a /usr/lib/oracle/12.1/client64/ symlink to /usr/lib/oracle/12.1/client64/libclntsh.so.10.1
        Can’t create symlink /usr/lib/oracle/12.1/client64/libclntsh.so to /usr/lib/oracle/12.1/client64/libclntsh.so.10.1: File exists
        Your LD_LIBRARY_PATH env var is set to ‘/usr/lib/oracle/12.1/client64/lib/:/usr/lib/oracle/12.1/client64/lib:/usr/lib/oracle/12.1/client64/lib’
        WARNING: Your LD_LIBRARY_PATH env var doesn’t include ‘/usr/lib/oracle/12.1/client64’ but probably needs to.
        Oracle sysliblist:
        Found header files in /usr/include/oracle/12.1/client64.

        client_version=12.1

        DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\”12.1.0.2\” -DORA_OCI_102 -DORA_OCI_112

        Checking for functioning wait.ph

        System: perl5.010001 linux x86-022.build.eng.bos.redhat.com 2.6.18-398.el5 #1 smp tue aug 12 06:26:17 edt 2014 x86_64 x86_64 x86_64 gnulinux
        Compiler: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
        Linker: /usr/bin/ld
        Sysliblist:
        Linking with -lclntsh.

        LD_RUN_PATH=/usr/lib/oracle/12.1/client64
        Using DBD::Oracle 1.66.
        Using DBD::Oracle 1.66.
        Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/auto/DBI/ at Makefile.PL line 1789
        Using DBI 1.615 (for perl 5.010001 on x86_64-linux-thread-multi) installed in /usr/local/lib64/perl5/auto/DBI/
        Writing Makefile for DBD::Oracle

        *** If you have problems…
        read all the log printed above, and the README and README.help.txt files.
        (Of course, you have read README by now anyway, haven’t you?)

        • Hi Dheena,

          At first glance, it looks like your LD_LIBRARY_PATH isn’t set up correctly. Once you get that ironed out, it’ll probably take care of the rest.

          Cheers,
          Vinny

  25. Hi Vinny,

    I am geting blow error. can you please help me in that.
    nstall_driver(Oracle) failed: Can’t locate DBD/Oracle.pm in @INC (@INC contains: /usr/perl5/5.8.4/lib/sun4-solaris-64int /usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4/sun4-solaris-64int /usr/perl5/site_perl/5.8.4 /usr/perl5/site_perl /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int /usr/perl5/vendor_perl/5.8.4 /usr/perl5/vendor_perl .) at (eval 3) line 3.
    Perhaps the DBD::Oracle perl module hasn’t been fully installed,
    or perhaps the capitalisation of ‘Oracle’ isn’t right.
    Available drivers: DBM, ExampleP, File, Gofer, Pg, Proxy, Sponge.
    at /softs/bmc/exploit/bin/em/process_alert line 210

    # perl Makefile.PL
    Multiple copies of Driver.xst found in: /opt/csw/lib/perl/site_perl/auto/DBI/ /opt/csw/lib/perl/csw/auto/DBI/ at Makefile.PL line 37
    Using DBI 1.611 (for perl 5.008008 on sun4-solaris-thread-multi) installed in /opt/csw/lib/perl/site_perl/auto/DBI/

    Configuring DBD::Oracle for perl 5.008008 on solaris (sun4-solaris-thread-multi)

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

    Installing on a solaris, Ver#2.8
    Using Oracle in /softs/bmc/sctme630/oracle/product/10.1.0.2
    DEFINE _SQLPLUS_RELEASE = “1001000300” (CHAR)
    Oracle version 10.1.0.3 (10.1)
    Found /softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/demo/demo_rdbms32.mk
    Using /softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/demo/demo_rdbms32.mk
    Your LD_LIBRARY_PATH env var is set to ‘/lib’
    WARNING: Your LD_LIBRARY_PATH env var doesn’t include ‘/softs/bmc/sctme630/oracle/product/10.1.0.2/lib32′ but probably needs to.
    Reading /softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/demo/demo_rdbms32.mk
    Reading /softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/lib/env_rdbms.mk

    Attempting to discover Oracle OCI build rules
    cc -c DBD_ORA_OBJ.c
    by executing: [make -f /softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/demo/demo_rdbms32.mk build ECHODO=echo ECHO=echo GENCLNTSH=’echo genclntsh’ CC=true OPTIMIZE= CCFLAGS= EXE=DBD_ORA_EXE OBJS=DBD_ORA_OBJ.o]
    Oracle oci build prolog:
    [Building client shared library libclntsh.so …]
    [Call script /softs/bmc/sctme630/oracle/product/10.1.0.2/bin/genclntsh …]
    [genclntsh]
    [Built /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so … DONE]
    Oracle oci build command:
    [true -xarch=v8 -L/softs/bmc/sctme630/oracle/product/10.1.0.2/lib32/ -L/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/lib32/ -o DBD_ORA_EXE DBD_ORA_OBJ.o -lclntsh `cat /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/sysliblist` -R/softs/bmc/sctme630/oracle/product/10.1.0.2/lib -laio -lposix4 -lkstat -lm -lthread]

    Found header files in /softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/public.

    Checking for functioning wait.ph

    System: perl5.008008 sunos ra 5.8 generic_117350-51 sun4u sparc sunw,sun-blade-1000
    Compiler: cc -xO3 -xtarget=ultra -xarch=v8 -D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
    Linker: /usr/ccs/bin/ld
    Sysliblist: -lnsl -lsocket -lgen -ldl
    Oracle makefiles would have used these definitions but we override them:
    CC: cc
    CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)
    $(SHARED_CFLAG) $(USRFLAGS)
    [$(GFLAG) -xO3 $(CDEBUG) -Xa $(PROFILE) -xstrconst -dalign -xF $(XS) $(MR) -xildoff -errtags=yes -v -xarch=v9 -xchip=ultra3 -W2,-AKNR_S -Wd,-xsafe=unboundsym -Wc,-Qiselect-funcalign=32 -xcode=abs44 -Wc,-Qgsched-trace_late=1 -Wc,-Qgsched-T5 -xalias_level=weak -D_REENTRANT -DSS_64BIT_SERVER -DBIT64 -DMACHINE64 -K PIC -I/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/demo -I/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/public -I/softs/bmc/sctme630/oracle/product/10.1.0.2/plsql/public -I/softs/bmc/sctme630/oracle/product/10.1.0.2/network/public -DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD -D_REENTRANT $(LPFLAGS) $(USRFLAGS)]
    LDFLAGS: -o [email protected] $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME)
    [-o [email protected] -L/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/lib/ -L$(LIBHOME)]
    Linking with OTHERLDFLAGS = -xarch=v8 -L/softs/bmc/sctme630/oracle/product/10.1.0.2/lib32/ -L/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/lib32/ -lclntsh `cat /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/sysliblist` -R/softs/bmc/sctme630/oracle/product/10.1.0.2/lib -laio -lposix4 -lkstat -lm -lthread [from ‘build’ rule]

    Checking if your kit is complete…
    Looks good
    LD_RUN_PATH=/softs/bmc/sctme630/oracle/product/10.1.0.2/lib32:/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/lib32
    Using DBD::Oracle 1.24.
    Using DBD::Oracle 1.24.
    Multiple copies of Driver.xst found in: /opt/csw/lib/perl/site_perl/auto/DBI/ /opt/csw/lib/perl/csw/auto/DBI/ at Makefile.PL line 1701
    Using DBI 1.611 (for perl 5.008008 on sun4-solaris-thread-multi) installed in /opt/csw/lib/perl/site_perl/auto/DBI/
    Writing Makefile for DBD::Oracle

    *** If you have problems…
    read all the log printed above, and the README and README.help.txt files.
    (Of course, you have read README by now anyway, haven’t you?)

    [[email protected]:/opt/DBD-ORA-PKG/DBD-Oracle-1.24]
    # make
    cp Oracle.pm blib/lib/DBD/Oracle.pm
    cp oraperl.ph blib/lib/oraperl.ph
    cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
    cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
    cp Oraperl.pm blib/lib/Oraperl.pm
    cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
    cp lib/DBD/Oracle/Object.pm blib/lib/DBD/Oracle/Object.pm
    cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
    cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
    /opt/csw/bin/perl -p -e “s/~DRIVER~/Oracle/g” /opt/csw/lib/perl/site_perl/auto/DBI/Driver.xst > Oracle.xsi
    /opt/csw/bin/perl /opt/csw/share/perl/5.8.8/ExtUtils/xsubpp -typemap /opt/csw/share/perl/5.8.8/ExtUtils/typemap -typemap typemap Oracle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c
    cc -c -I/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/public -I/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/demo -I/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/public -I/softs/bmc/sctme630/oracle/product/10.1.0.2/plsql/public -I/softs/bmc/sctme630/oracle/product/10.1.0.2/network/public -I/opt/csw/lib/perl/site_perl/auto/DBI -D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xtarget=ultra -xarch=v8 -DVERSION=”1.24″ -DXS_VERSION=”1.24″ -KPIC “-I/opt/csw/lib/perl/5.8.8/CORE” -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=”10.1.0.3″ Oracle.c
    cc -c -I/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/public -I/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/demo -I/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/public -I/softs/bmc/sctme630/oracle/product/10.1.0.2/plsql/public -I/softs/bmc/sctme630/oracle/product/10.1.0.2/network/public -I/opt/csw/lib/perl/site_perl/auto/DBI -D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xtarget=ultra -xarch=v8 -DVERSION=”1.24″ -DXS_VERSION=”1.24″ -KPIC “-I/opt/csw/lib/perl/5.8.8/CORE” -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=”10.1.0.3″ dbdimp.c
    cc -c -I/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/public -I/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/demo -I/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/public -I/softs/bmc/sctme630/oracle/product/10.1.0.2/plsql/public -I/softs/bmc/sctme630/oracle/product/10.1.0.2/network/public -I/opt/csw/lib/perl/site_perl/auto/DBI -D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xtarget=ultra -xarch=v8 -DVERSION=”1.24″ -DXS_VERSION=”1.24″ -KPIC “-I/opt/csw/lib/perl/5.8.8/CORE” -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=”10.1.0.3″ oci8.c
    Running Mkbootstrap for DBD::Oracle ()
    chmod 644 Oracle.bs
    rm -f blib/arch/auto/DBD/Oracle/Oracle.so
    LD_RUN_PATH=”/softs/bmc/sctme630/oracle/product/10.1.0.2/lib32:/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/lib32″ cc -G -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib/v8plus -L/opt/SUNWspro/prod/lib -L/lib Oracle.o dbdimp.o oci8.o -xarch=v8 -L/softs/bmc/sctme630/oracle/product/10.1.0.2/lib32/ -L/softs/bmc/sctme630/oracle/product/10.1.0.2/rdbms/lib32/ -lclntsh `cat /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/sysliblist` -R/softs/bmc/sctme630/oracle/product/10.1.0.2/lib -laio -lposix4 -lkstat -lm -lthread -o blib/arch/auto/DBD/Oracle/Oracle.so

    chmod 755 blib/arch/auto/DBD/Oracle/Oracle.so
    cp Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs
    chmod 644 blib/arch/auto/DBD/Oracle/Oracle.bs
    /opt/csw/bin/perl “-Iblib/arch” “-Iblib/lib” ora_explain.PL ora_explain
    Extracted ora_explain from ora_explain.PL with variable substitutions.
    cp ora_explain blib/script/ora_explain
    /opt/csw/bin/perl “-MExtUtils::MY” -e “MY->fixin(shift)” blib/script/ora_explain
    Manifying blib/man1/ora_explain.1
    Manifying blib/man3/DBD::Oracle.3perl
    Manifying blib/man3/DBD::Oraperl.3perl
    [[email protected]:/opt/DBD-ORA-PKG/DBD-Oracle-1.24]
    # make test
    PERL_DL_NONLAZY=1 /opt/csw/bin/perl “-MExtUtils::Command::MM” “-e” “test_harness(0, ‘blib/lib’, ‘blib/arch’)” t/*.t
    t/01base…………….# Test loading DBI, DBD::Oracle and version
    t/01base…………….ok 1/6
    # Failed test ‘install_driver’
    # at t/01base.t line 22.
    t/01base…………….NOK 4Failed to load Oracle extension and/or shared libraries:
    install_driver(Oracle) failed: Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at (eval 7) line 3
    Compilation failed in require at (eval 7) line 3.
    Perhaps a required shared library or dll isn’t installed where expected
    at t/01base.t line 19
    The remaining tests will probably also fail with the same error.

    *** Please read the README and README.help.txt files for help. ***

    t/01base…………….ok 5/6# Looks like you failed 1 test of 6.
    t/01base…………….dubious
    Test returned status 1 (wstat 256, 0x100)
    DIED. FAILED test 4
    Failed 1/6 tests, 83.33% okay (less 2 skipped tests: 3 okay, 50.00%)
    t/10general………….install_driver(Oracle) failed: Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at (eval 5) line 3
    Compilation failed in require at (eval 5) line 3.
    Perhaps a required shared library or dll isn’t installed where expected
    at /opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/lib/Oraperl.pm line 55
    Compilation failed in require at t/10general.t line 6.
    BEGIN failed–compilation aborted at t/10general.t line 6.
    # Looks like your test died before it could output anything.
    t/10general………….dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/12impdata………….Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/nchar_test_lib.pl line 6
    Compilation failed in require at t/nchar_test_lib.pl line 6.
    BEGIN failed–compilation aborted at t/nchar_test_lib.pl line 6.
    Compilation failed in require at t/12impdata.t line 27.
    # Looks like your test died before it could output anything.
    t/12impdata………….dubious
    Test returned status 255 (wstat 65280, 0xff00)
    DIED. FAILED tests 1-7
    Failed 7/7 tests, 0.00% okay
    t/14threads………….Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/nchar_test_lib.pl line 6
    Compilation failed in require at t/nchar_test_lib.pl line 6.
    BEGIN failed–compilation aborted at t/nchar_test_lib.pl line 6.
    Compilation failed in require at t/14threads.t line 30.
    # Looks like your test died before it could output anything.
    t/14threads………….dubious
    Test returned status 255 (wstat 65280, 0xff00)
    DIED. FAILED tests 1-19
    Failed 19/19 tests, 0.00% okay
    t/15nls……………..Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/nchar_test_lib.pl line 6
    Compilation failed in require at t/nchar_test_lib.pl line 6.
    BEGIN failed–compilation aborted at t/nchar_test_lib.pl line 6.
    Compilation failed in require at t/15nls.t line 9.
    # Looks like your test died before it could output anything.
    t/15nls……………..dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/20select…………..Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/20select.t line 4
    Compilation failed in require at t/20select.t line 4.
    BEGIN failed–compilation aborted at t/20select.t line 4.
    # Looks like your test died before it could output anything.
    t/20select…………..dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/21nchar……………Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/21nchar.t line 12
    Compilation failed in require at t/21nchar.t line 12.
    BEGIN failed–compilation aborted at t/21nchar.t line 12.
    # Looks like your test died before it could output anything.
    t/21nchar……………dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/22nchar_al32utf8……Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/22nchar_al32utf8.t line 9
    Compilation failed in require at t/22nchar_al32utf8.t line 9.
    BEGIN failed–compilation aborted at t/22nchar_al32utf8.t line 9.
    # Looks like your test died before it could output anything.
    t/22nchar_al32utf8……dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/22nchar_utf8……….Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/22nchar_utf8.t line 9
    Compilation failed in require at t/22nchar_utf8.t line 9.
    BEGIN failed–compilation aborted at t/22nchar_utf8.t line 9.
    # Looks like your test died before it could output anything.
    t/22nchar_utf8……….dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/23wide_db………….Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/23wide_db.t line 9
    Compilation failed in require at t/23wide_db.t line 9.
    BEGIN failed–compilation aborted at t/23wide_db.t line 9.
    # Looks like your test died before it could output anything.
    t/23wide_db………….dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/23wide_db_8bit……..Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/23wide_db_8bit.t line 9
    Compilation failed in require at t/23wide_db_8bit.t line 9.
    BEGIN failed–compilation aborted at t/23wide_db_8bit.t line 9.
    # Looks like your test died before it could output anything.
    t/23wide_db_8bit……..dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/23wide_db_al32utf8….Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/23wide_db_al32utf8.t line 9
    Compilation failed in require at t/23wide_db_al32utf8.t line 9.
    BEGIN failed–compilation aborted at t/23wide_db_al32utf8.t line 9.
    # Looks like your test died before it could output anything.
    t/23wide_db_al32utf8….dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/24implicit_utf8…….Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/24implicit_utf8.t line 12
    Compilation failed in require at t/24implicit_utf8.t line 12.
    BEGIN failed–compilation aborted at t/24implicit_utf8.t line 12.
    # Looks like your test died before it could output anything.
    t/24implicit_utf8…….dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/25plsql……………Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/25plsql.t line 5
    Compilation failed in require at t/25plsql.t line 5.
    BEGIN failed–compilation aborted at t/25plsql.t line 5.
    # Looks like your test died before it could output anything.
    t/25plsql……………dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/26exe_array………..Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/26exe_array.t line 4
    Compilation failed in require at t/26exe_array.t line 4.
    BEGIN failed–compilation aborted at t/26exe_array.t line 4.
    t/26exe_array………..dubious
    Test returned status 2 (wstat 512, 0x200)
    t/28array_bind……….Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/28array_bind.t line 22
    Compilation failed in require at t/28array_bind.t line 22.
    BEGIN failed–compilation aborted at t/28array_bind.t line 22.
    t/28array_bind……….dubious
    Test returned status 2 (wstat 512, 0x200)
    t/30long…………….Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/30long.t line 5
    Compilation failed in require at t/30long.t line 5.
    BEGIN failed–compilation aborted at t/30long.t line 5.
    t/30long…………….dubious
    Test returned status 2 (wstat 512, 0x200)
    t/31lob……………..Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/31lob.t line 5
    Compilation failed in require at t/31lob.t line 5.
    BEGIN failed–compilation aborted at t/31lob.t line 5.
    # Looks like your test died before it could output anything.
    t/31lob……………..dubious
    Test returned status 255 (wstat 65280, 0xff00)
    DIED. FAILED tests 1-11
    Failed 11/11 tests, 0.00% okay
    t/31lob_extended……..Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/31lob_extended.t line 16
    Compilation failed in require at t/31lob_extended.t line 16.
    BEGIN failed–compilation aborted at t/31lob_extended.t line 16.
    # Looks like your test died before it could output anything.
    t/31lob_extended……..dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/32xmltype………….Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/32xmltype.t line 5
    Compilation failed in require at t/32xmltype.t line 5.
    BEGIN failed–compilation aborted at t/32xmltype.t line 5.
    # Looks like your test died before it could output anything.
    t/32xmltype………….dubious
    Test returned status 255 (wstat 65280, 0xff00)
    DIED. FAILED tests 1-4
    Failed 4/4 tests, 0.00% okay
    t/34pres_lobs………..install_driver(Oracle) failed: Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at (eval 5) line 3
    Compilation failed in require at (eval 5) line 3.
    Perhaps a required shared library or dll isn’t installed where expected
    at /opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/lib/Oraperl.pm line 55
    Compilation failed in require at t/34pres_lobs.t line 6.
    BEGIN failed–compilation aborted at t/34pres_lobs.t line 6.
    # Looks like your test died before it could output anything.
    t/34pres_lobs………..dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/40ph_type………….Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/40ph_type.t line 6
    Compilation failed in require at t/40ph_type.t line 6.
    BEGIN failed–compilation aborted at t/40ph_type.t line 6.
    # Looks like your test died before it could output anything.
    t/40ph_type………….dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/50cursor…………..Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/50cursor.t line 5
    Compilation failed in require at t/50cursor.t line 5.
    BEGIN failed–compilation aborted at t/50cursor.t line 5.
    # Looks like your test died before it could output anything.
    t/50cursor…………..dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/51scroll…………..Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/51scroll.t line 5
    Compilation failed in require at t/51scroll.t line 5.
    BEGIN failed–compilation aborted at t/51scroll.t line 5.
    # Looks like your test died before it could output anything.
    t/51scroll…………..dubious
    Test returned status 255 (wstat 65280, 0xff00)
    DIED. FAILED tests 1-33
    Failed 33/33 tests, 0.00% okay
    t/55nested…………..Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/55nested.t line 5
    Compilation failed in require at t/55nested.t line 5.
    BEGIN failed–compilation aborted at t/55nested.t line 5.
    # Looks like your test died before it could output anything.
    t/55nested…………..dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/56embbeded…………Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/56embbeded.t line 4
    Compilation failed in require at t/56embbeded.t line 4.
    BEGIN failed–compilation aborted at t/56embbeded.t line 4.
    t/56embbeded…………dubious
    Test returned status 2 (wstat 512, 0x200)
    t/58object…………..Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/58object.t line 4
    Compilation failed in require at t/58object.t line 4.
    BEGIN failed–compilation aborted at t/58object.t line 4.
    t/58object…………..dubious
    Test returned status 2 (wstat 512, 0x200)
    t/60reauth…………..Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/nchar_test_lib.pl line 6
    Compilation failed in require at t/nchar_test_lib.pl line 6.
    BEGIN failed–compilation aborted at t/nchar_test_lib.pl line 6.
    Compilation failed in require at t/60reauth.t line 6.
    # Looks like your test died before it could output anything.
    t/60reauth…………..dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/70meta…………….Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/nchar_test_lib.pl line 6
    Compilation failed in require at t/nchar_test_lib.pl line 6.
    BEGIN failed–compilation aborted at t/nchar_test_lib.pl line 6.
    Compilation failed in require at t/70meta.t line 9.
    # Looks like your test died before it could output anything.
    t/70meta…………….dubious
    Test returned status 255 (wstat 65280, 0xff00)
    t/80ora_charset………Can’t load ‘/opt/DBD-ORA-PKG/DBD-Oracle-1.24/blib/arch/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: ld.so.1: perl: fatal: /softs/bmc/sctme630/oracle/product/10.1.0.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64 at /opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
    at t/80ora_charset.t line 8
    Compilation failed in require at t/80ora_charset.t line 8.
    BEGIN failed–compilation aborted at t/80ora_charset.t line 8.
    t/80ora_charset………dubious
    Test returned status 2 (wstat 512, 0x200)
    Failed Test Stat Wstat Total Fail Failed List of Failed
    ——————————————————————————-
    t/01base.t 1 256 6 1 16.67% 4
    t/10general.t 255 65280 ?? ?? % ??
    t/12impdata.t 255 65280 7 14 200.00% 1-7
    t/14threads.t 255 65280 19 38 200.00% 1-19
    t/15nls.t 255 65280 ?? ?? % ??
    t/20select.t 255 65280 ?? ?? % ??
    t/21nchar.t 255 65280 ?? ?? % ??
    t/22nchar_al32utf8.t 255 65280 ?? ?? % ??
    t/22nchar_utf8.t 255 65280 ?? ?? % ??
    t/23wide_db.t 255 65280 ?? ?? % ??
    t/23wide_db_8bit.t 255 65280 ?? ?? % ??
    t/23wide_db_al32utf8.t 255 65280 ?? ?? % ??
    t/24implicit_utf8.t 255 65280 ?? ?? % ??
    t/25plsql.t 255 65280 ?? ?? % ??
    t/26exe_array.t 2 512 ?? ?? % ??
    t/28array_bind.t 2 512 ?? ?? % ??
    t/30long.t 2 512 ?? ?? % ??
    t/31lob.t 255 65280 11 22 200.00% 1-11
    t/31lob_extended.t 255 65280 ?? ?? % ??
    t/32xmltype.t 255 65280 4 8 200.00% 1-4
    t/34pres_lobs.t 255 65280 ?? ?? % ??
    t/40ph_type.t 255 65280 ?? ?? % ??
    t/50cursor.t 255 65280 ?? ?? % ??
    t/51scroll.t 255 65280 33 66 200.00% 1-33
    t/55nested.t 255 65280 ?? ?? % ??
    t/56embbeded.t 2 512 ?? ?? % ??
    t/58object.t 2 512 ?? ?? % ??
    t/60reauth.t 255 65280 ?? ?? % ??
    t/70meta.t 255 65280 ?? ?? % ??
    t/80ora_charset.t 2 512 ?? ?? % ??
    2 subtests skipped.
    Failed 30/30 test scripts, 0.00% okay. 75/80 subtests failed, 6.25% okay.
    *** Error code 2
    make: Fatal error: Command failed for target `test_dynamic’
    [[email protected]:/opt/DBD-ORA-PKG/DBD-Oracle-1.24]
    # make install
    Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
    Writing /opt/csw/lib/perl/site_perl/auto/DBD/Oracle/.packlist
    Appending installation info to /opt/csw/lib/perl/5.8.8/perllocal.pod

    • Hey Pankaj,

      Take a look at this comment by Tim Bunce. It looks like you have some old files lying around.

      http://www.nntp.perl.org/group/perl.dbi.users/2004/08/msg23651.html

      I see you’re also getting “wrong ELF class: ELFCLASS64” errors. The Makefile.PL output warns you about your LD_LIBRARY_PATH variable, which ends up being the cause of the ELFCLASS64 error.

      Your LD_LIBRARY_PATH env var is set to ‘/lib’
      WARNING: Your LD_LIBRARY_PATH env var doesn’t include ‘/softs/bmc/sctme630/oracle/product/10.1.0.2/lib32′
      

      Make sure you add the lib32 dir to LD_LIBRARY_PATH, preferably as the first entry

      export LD_LIBRARY_PATH=/softs/bmc/sctme630/oracle/product/10.1.0.2/lib32:$LD_LIBRARY_PATH
      perl Makefile.PL
      
  26. Hi Vinney,
    Thanks for ur prompt reply. Its working fine now
    -Pankaj

  27. Hey guys, i have a problem when do the last part:

    WARNING: Setting ORACLE_HOME env var to /usr/sbin for you.
    WARNING: If these tests fail you may have to set ORACLE_HOME yourself!
    The ORACLE_HOME environment variable value (/usr/sbin) is not valid.
    It must be set to hold the path to an Oracle installation directory
    on this machine (or a machine with a compatible architecture).
    For an Instant Client install, the directory should include an sdk subdirectory.
    See the appropriate README file for your OS for more information.
    ABORTED!
    Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
    PYTHIAN/DBD-Oracle-1.24b.tar.gz
    /usr/bin/perl Makefile.PL INSTALLDIRS=site — NOT OK
    Running make test
    Make had some problems, won’t test
    Running make install
    Make had some problems, won’t install
    Failed during this command:
    PYTHIAN/DBD-Oracle-1.24b.tar.gz : writemakefile NO ‘/usr/bin/perl Makefile.PL INSTALLDIRS=site’ returned status 512

    Dont know to finish the installation of DBD::Oracle, and cant find a solution on the web… :-/

    • Allen,
      You don’t seem to have set ORACLE_HOME correctly, so the module isn’t finding the client libs in order to build. Review the steps in “Set up your Environment Variables” and try again.

  28. Thanks a lot, man – very helpful!

  29. Hi Vinny, I’m trying to install DBD (on RHEL 5.4), but still getting problems.
    necessary variables are set:
    echo $ORACLE_HOME
    /opt/oracle/product/11.2.0/client_2
    export PATH=$PATH:$ORACLE_HOME/bin
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib
    but when compiling:
    Could not open ‘Oracle.pm’: Datei oder Verzeichnis nicht gefunden at /opt/oracle/product/11.2.0/client_2/perl/lib/5.10.0/ExtUtils/MM_Unix.pm line 2698.

    (yes, I know.. the error message contains German, but this is not my server..)

    • Hi Sam,

      Google Translate says that the message in German means “No such file or directory” (in a buggy manner, but that’s the message nevertheless). Make sure your paths are correct and run a find for Oracle.pm to see where it’s at.

      Cheers,
      Vinny

  30. Thank you for your answer.
    As you can see the Oracle.pm file besides in my $ORACLE_HOME, but as expected the script didn’t found it. I don’t have any idea what’s the problem there.

    #locate Oracle.pm
    /opt/oracle/product/11.2.0/client_2/perl/lib/site_perl/5.10.0/x86_64-linux-thread-multi/DBD/Oracle.pm
    /root/DBD-Oracle-1.22/Oracle.pm
    /home/user1/dbd/DBD-Oracle-1.22/Oracle.pm

    To make it clear, now I’m pasting the full message:

    ]# ./perl /root/DBD-Oracle-1.22/Makefile.PL
    Using DBI 1.602 (for perl 5.010000 on x86_64-linux-thread-multi) installed in /opt/oracle/product/11.2.0/client_2/perl/lib/site_perl/5.10.0/x86_64-linux-thread-multi/auto/DBI/

    Configuring DBD::Oracle for perl 5.010000 on linux (x86_64-linux-thread-multi)

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

    Installing on a linux, Ver#2.6
    Using Oracle in /opt/oracle/product/11.2.0/client_2
    DEFINE _SQLPLUS_RELEASE = “1102000100” (CHAR)
    Oracle version 11.2.0.1 (11.2)
    Found /opt/oracle/product/11.2.0/client_2/rdbms/lib/ins_rdbms.mk
    Using /opt/oracle/product/11.2.0/client_2/rdbms/lib/ins_rdbms.mk
    Your LD_LIBRARY_PATH env var is set to ‘/opt/oracle/product/11.2.0/client_2/lib’
    Reading /opt/oracle/product/11.2.0/client_2/rdbms/lib/ins_rdbms.mk
    Reading /opt/oracle/product/11.2.0/client_2/rdbms/lib/env_rdbms.mk
    WARNING: Oracle /opt/oracle/product/11.2.0/client_2/rdbms/lib/ins_rdbms.mk doesn’t define a ‘build’ rule.

    WARNING: I will now try to guess how to build and link DBD::Oracle for you.
    This kind of guess work is very error prone and Oracle-version sensitive.
    It is possible that it won’t be supported in future versions of DBD::Oracle.
    *PLEASE* notify dbi-users about exactly _why_ you had to build it this way.

    Found header files in /opt/oracle/product/11.2.0/client_2/rdbms/public.

    Checking for functioning wait.ph

    System: perl5.010000 linux stasa08 2.6.9-34.0.1.0.11.elsmp #1 smp mon dec 4 22:20:39 utc 2006 x86_64 x86_64 x86_64 gnulinux
    Compiler: cc -O2 -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -fPIC -DMACHINE64 -DLINUX -DORAX86_64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
    Linker: /usr/bin/ld
    Sysliblist: -ldl -lm -lpthread -lnsl -lirc -lipgo -lsvml
    Oracle makefiles would have used these definitions but we override them:
    CC: $(COMPDIR)/bin/gcc
    CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)
    $(SHARED_CFLAG) $(USRFLAGS)
    [$(GFLAG) -O3 $(CDEBUG) -m32 -trigraphs -fPIC -I/opt/oracle/product/11.2.0/client_2/rdbms/demo -I/opt/oracle/product/11.2.0/client_2/rdbms/public -I/opt/oracle/product/11.2.0/client_2/plsql/public -I/opt/oracle/product/11.2.0/client_2/network/public -DLINUX -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS -D__NO_CTYPE=1 -DLDAP_CM $(LPFLAGS) $(PLSQLNCGFLAGS) $(USRFLAGS)]
    LDFLAGS: $(LDFLAGS32)
    [-m32 -o [email protected] -L/opt/oracle/product/11.2.0/client_2/rdbms//lib32/ -L/opt/oracle/product/11.2.0/client_2/lib32/ -L/opt/oracle/product/11.2.0/client_2/lib32/stubs/]
    Linking with -lclntsh -ldl -lm -lpthread -lnsl -lirc -lipgo -lsvml -ldl -lm -lpthread [from $(OCISHAREDLIBS)]

    Could not open ‘Oracle.pm’: Datei oder Verzeichnis nicht gefunden at /opt/oracle/product/11.2.0/client_2/perl/lib/5.10.0/ExtUtils/MM_Unix.pm line 2698.

    My Oracle install directory is:
    echo $ORACLE_HOME
    /opt/oracle/product/11.2.0/client_2
    I’ve also tried to compile it with perl installed on system, but in this case I’m getting stranger error message, asking for DBI.pm.

    perl /root/DBD-Oracle-1.22/Makefile.PL
    Can’t locate DBI.pm in @INC (@INC contains: /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.4/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.3/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.2/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.1/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.4/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.3/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.2/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /root/DBD-Oracle-1.22/Makefile.PL line 21.
    BEGIN failed–compilation aborted at /root/DBD-Oracle-1.22/Makefile.PL line 21.

    Do you have any advice?

  31. Hi Vinny, thank you for the article. You saved my day!!!

    • Hi Parthi, I’m glad I could help. Please make sure you read through the comments as well, since there’s lots of good info in there, too.

  32. Hi
    would be great if you could help shed some light on this as it is driving me insane.

    I have installed Red Hat Enterprise Linux Server release 5.5 (Tikanga)
    Our oracle dba has installed oracle 11g client and set up a tsnnames.ora entry.

    ORACLE_HOME=/usr/local/oracle/product/11.2.0/client_1
    export ORACLE_USERID=theuser/thepassword
    export ORACLE_DSN=”dbi:Oracle:APTEST”
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib
    export PATH=$PATH:$ORACLE_HOME/bin

    The oracle database APTEST is on another server and I can login to it using sqlplus from this server…

    sqlplus theuser/[email protected]

    I have installed DBD::Oracle-Oracle-1.27 (you can see results of “make test” below….there are a few errors but less than i have had with different variables.

    I have an web app that is supposed to use this perl module.

    When i login to that I can choose the “oracle” driver then for
    “Host name” I choose “localhost” instead of the server the db is on.
    “Port number” is 1521
    “System identifier” is APTEST
    and i put the username/password in here as well.

    When I click on “make changes” it says…
    Connection failed with these error(s): ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc.
    which is presumably to do with the DBD::Oracle module.
    Any ideas on what I should use for ORACLE_DSN instead??

    make test
    PERL_DL_NONLAZY=1 /usr/bin/perl “-MExtUtils::Command::MM” “-e” “test_harness(0, ‘blib/lib’, ‘blib/arch’)” t/*.t
    t/01base.t ………….. 1/6 # Test loading DBI, DBD::Oracle and version
    t/01base.t ………….. ok
    t/10general.t ……….. ok
    t/12impdata.t ……….. ok
    t/14threads.t ……….. ok
    t/15nls.t …………… ok
    t/20select.t ………… ok
    t/21nchar.t …………. ok
    t/22nchar_al32utf8.t …. ok
    t/22nchar_utf8.t …….. ok
    t/23wide_db.t ……….. skipped: Database character set is not Unicode
    t/23wide_db_8bit.t …… skipped: Database character set is not Unicode
    t/23wide_db_al32utf8.t .. skipped: Database character set is not Unicode
    t/24implicit_utf8.t ….. ok
    t/25plsql.t …………. ok
    t/26exe_array.t ……… ok
    t/28array_bind.t …….. ok
    t/30long.t ………….. ok
    t/31lob.t …………… 1/12 DBD::Oracle::st execute failed: ORA-24813: cannot send or receive an unsupported LOB (DBD ERROR: OCIStmtExecute) [for Statement “BEGIN ? := DBMS_LOB.GETLENGTH( ? ); END;” with ParamValues: :p1=undef, :p2=OCILobLocatorPtr=SCALAR(0xc7f1840)] at t/31lob.t line 126.

    t/31lob.t …………… Dubious, test returned 1 (wstat 256, 0x100)
    Failed 4/12 subtests
    t/31lob_extended.t …… ok
    t/32xmltype.t ……….. ok
    t/34pres_lobs.t ……… ok
    t/40ph_type.t ……….. 1/19 Placeholder behaviour for ora_type=1 VARCHAR2 (the default) varies with Oracle version.
    Oracle 7 didn’t strip trailing spaces, Oracle 8 did, until 9.2.x
    Your system doesn’t. If that seems odd, let us know.
    t/40ph_type.t ……….. ok
    t/50cursor.t ………… ok
    t/51scroll.t ………… ok
    t/55nested.t ………… ok
    t/56embbeded.t ………. ok
    t/58object.t ………… ok
    t/60reauth.t ………… skipped: ORACLE_USERID_2 not defined.
    t/70meta.t ………….. ok
    t/80ora_charset.t ……. ok

    Test Summary Report
    ——————-
    t/31lob.t (Wstat: 256 Tests: 9 Failed: 1)
    Failed test: 9
    Non-zero exit status: 1
    Parse errors: Bad plan. You planned 12 tests but ran 9.
    Files=30, Tests=2156, 21 wallclock secs ( 0.48 usr 0.04 sys + 5.76 cusr 0.71 csys = 6.99 CPU)
    Result: FAIL
    Failed 1/30 test programs. 1/2156 subtests failed.
    make: *** [test_dynamic] Error 255
    [

    any help would be appreciated, am going nuts
    thanks
    marina

    • Sorry for the delay in approving and replying to your comment – you probably already figured it out by now, but it seems to me that you forgot to export your ORACLE_HOME variable.

      ORACLE_HOME=/usr/local/oracle/product/11.2.0/client_1
      export ORACLE_USERID=theuser/thepassword
      export ORACLE_DSN=”dbi:Oracle:APTEST”
      export LD_LIBRARY_PATH=$ORACLE_HOME/lib
      export PATH=$PATH:$ORACLE_HOME/bin

      should be

      export ORACLE_HOME=/usr/local/oracle/product/11.2.0/client_1
      export ORACLE_USERID=theuser/thepassword
      export ORACLE_DSN=”dbi:Oracle:APTEST”
      export LD_LIBRARY_PATH=$ORACLE_HOME/lib
      export PATH=$PATH:$ORACLE_HOME/bin

      Please let me know if this helps!

  33. Thanks Vinny, I did export it, I just didn’t cut and paste it properly when I put it here, sorry. It did turn out to be a problem with with the web server app not knowing what the ORACLE_HOME variable was, although i had it in /etc/profile I had to put it in a special file called localConfig.pl which the app used as well to make it pick it up

    • Hi Marina.

      I’m sorry the solution wasn’t as simple as my suggestion, but I’m glad you got to the bottom of it!

      Cheers,
      Vinny

  34. Hi Vinny,

    I am using HP UX B.11.31 U ia64 and Oracle 11g and trying to install Perl DBI from the package DBD-Oracle-1.22. But failed due to some errors.
    In Oracle 10g it is okay. I am able to install.
    While installing with Oracle 11g, and with DBD-Oracle-1.23, it is failed wioth below error.
    Need you help/suggestion. I am not able to proceed further.

    Logs
    —–
    $ perl Makefile.PL PREFIX=/opt/recat/perl_dbi
    Multiple copies of Driver.xst found in: /opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi//auto/DBI/ /opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/auto/DBI/ at Makefile.PL line 37
    Using DBI 1.57 (for perl 5.008008 on IA64.ARCHREV_0-thread-multi) installed in /opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi//auto/DBI/

    Configuring DBD::Oracle for perl 5.008008 on hpux (IA64.ARCHREV_0-thread-multi)

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

    Installing on a hpux, Ver#11.23
    Using Oracle in /mnt2/disk200/oracle/product/11.2.0/client_2
    DEFINE _SQLPLUS_RELEASE = “1102000100” (CHAR)
    Oracle version 11.2.0.1 (11.2)
    Found /mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/lib/ins_rdbms.mk
    Using /mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/lib/ins_rdbms.mk
    Your LD_LIBRARY_PATH/SHLIB_PATH env var is set to ‘/mnt2/disk200/oracle/product/11.2.0/client_2/lib:/lib:/usr/lib:/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/lib:/mnt2/disk200/oracle/product/11.2.0/client_2/lib32:/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/lib32’
    Reading /mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/lib/ins_rdbms.mk
    Reading /mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/lib/env_rdbms.mk
    WARNING: Oracle /mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/lib/ins_rdbms.mk doesn’t define a ‘build’ rule.

    WARNING: I will now try to guess how to build and link DBD::Oracle for you.
    This kind of guess work is very error prone and Oracle-version sensitive.
    It is possible that it won’t be supported in future versions of DBD::Oracle.
    *PLEASE* notify dbi-users about exactly _why_ you had to build it this way.

    Found header files in /mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/public.
    WARNING: If you have trouble, see README.hpux.txt…
    you may have to build your own perl, or go hunting for libraries
    WARNING: If you have trouble, try perl Makefile.PL -l

    Checking for functioning wait.ph

    System: perl5.008008 hp-ux buzz b.11.23 u ia64 3101164512 unlimited-user license
    Compiler: cc -fast +Ofltacc=strict -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DSitanium2 +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
    Linker: /usr/bin/ld
    Sysliblist: -lrt -ldl -lm -lpthread -lnsl -lunwind -ldiskown
    Oracle makefiles would have used these definitions but we override them:
    CC: cc
    CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)
    $(SHARED_CFLAG) $(USRFLAGS)
    [$(GFLAG) $(OPTIMIZE) $(CDEBUG) -Ae -z +Olibmerrno +Z -DHPUX -DORAIA64 -DHPUX_IA64 +DD64 -DSS_64BIT_SERVER -DHPPA64 -DSLS8NATIVE -DSLU8NATIVE +DD64 -D_LARGEFILE64_SOURCE -D_REENTRANT -DHPUX_KTHREAD -DSLXMX_ENABLE -DSLTS_ENABLE -D_REENTRANT -D_HPUX_API_LEVEL=20040821 -I/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/demo -I/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/public -I/mnt2/disk200/oracle/product/11.2.0/client_2/plsql/public -I/mnt2/disk200/oracle/product/11.2.0/client_2/network/public -DHPUX -D_REENTRANT -DHPUX_KTHREAD -DSLXMX_ENABLE -DSLTS_ENABLE -DSS_64BIT_SERVER -DBIT64 -DMACHINE64 -DORAIA64 -DHPUX_IA64 -DLDAP_CM $(LPFLAGS) $(PLSQLNCGFLAGS) $(USRFLAGS)]
    LDFLAGS: -Wl,+k -Wl,+s -Wl,+n $(LDARCH_FLAGS) -o [email protected] -L$(PRODLIBHOME) -L$(LIBHOME)
    [-Wl,+k -Wl,+s -Wl,+n +DD64 -o [email protected] -L/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/lib/ -L$(LIBHOME)]
    Linking with -lclntsh -lrt -ldl -lm -lpthread -lnsl -lunwind -ldiskown -ldl -lm -lpthread -lrt -lpthread [from $(OCISHAREDLIBS)]

    LD_RUN_PATH=/mnt2/disk200/oracle/product/11.2.0/client_2/lib:/usr/lib/hpux32
    Using DBD::Oracle 1.23.
    Using DBD::Oracle 1.23.
    Multiple copies of Driver.xst found in: /opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi//auto/DBI/ /opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/auto/DBI/ at Makefile.PL line 1696
    Using DBI 1.57 (for perl 5.008008 on IA64.ARCHREV_0-thread-multi) installed in /opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi//auto/DBI/
    Writing Makefile for DBD::Oracle

    *** If you have problems…
    read all the log printed above, and the README and README.help.txt files.
    (Of course, you have read README by now anyway, haven’t you?)
    —————————————————————————————
    $ make
    Skip blib/lib/DBD/Oracle.pm (unchanged)
    Skip blib/lib/oraperl.ph (unchanged)
    Skip blib/arch/auto/DBD/Oracle/dbdimp.h (unchanged)
    Skip blib/arch/auto/DBD/Oracle/ocitrace.h (unchanged)
    Skip blib/lib/Oraperl.pm (unchanged)
    Skip blib/arch/auto/DBD/Oracle/Oracle.h (unchanged)
    Skip blib/lib/DBD/Oracle/Object.pm (unchanged)
    cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
    Skip blib/lib/DBD/Oracle/GetInfo.pm (unchanged)
    cc -c -I/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/public -I/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/demo -I/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/public -I/mnt2/disk200/oracle/product/11.2.0/client_2/plsql/public -I/mnt2/disk200/oracle/product/11.2.0/client_2/network/public -I/opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/auto/DBI -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DSitanium2 +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fast +Ofltacc=strict -DVERSION=”1.23″ -DXS_VERSION=”1.23″ +Z “-I/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE” -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=”11.2.0.1″ Oracle.c
    (Bundled) cc: warning 922: “-Ae” is unsupported in the bundled compiler, ignored.
    (Bundled) cc: warning 922: “-fast” is unsupported in the bundled compiler, ignored.
    (Bundled) cc: warning 922: “+Ofltacc=strict” is unsupported in the bundled compiler, ignored.
    “Oracle.c”, line 1197: warning #2128-D: loop is not reachable from preceding
    code
    XSRETURN_EMPTY;
    ^

    “Oracle.c”, line 1241: warning #2128-D: loop is not reachable from preceding
    code
    XSRETURN_EMPTY;
    ^

    “Oracle.c”, line 1457: warning #2128-D: loop is not reachable from preceding
    code
    XSRETURN_EMPTY;
    ^

    cc -c -I/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/public -I/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/demo -I/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/public -I/mnt2/disk200/oracle/product/11.2.0/client_2/plsql/public -I/mnt2/disk200/oracle/product/11.2.0/client_2/network/public -I/opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/auto/DBI -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DSitanium2 +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fast +Ofltacc=strict -DVERSION=”1.23″ -DXS_VERSION=”1.23″ +Z “-I/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE” -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=”11.2.0.1″ dbdimp.c
    (Bundled) cc: warning 922: “-Ae” is unsupported in the bundled compiler, ignored.
    (Bundled) cc: warning 922: “-fast” is unsupported in the bundled compiler, ignored.
    (Bundled) cc: warning 922: “+Ofltacc=strict” is unsupported in the bundled compiler, ignored.
    “dbdimp.c”, line 93: warning #2236-D: controlling expression is constant
    && OCIErrorGet_log_stat(errhp, recno, (text*)NULL, &eg_errcode, errbuf,
    ^

    “dbdimp.c”, line 295: warning #4276-D: relational operator “>” always
    evaluates to ‘false’
    Newz(42, fb_ary->abuf, size * piece_size, ub1);
    ^

    “dbdimp.c”, line 296: warning #4276-D: relational operator “>” always
    evaluates to ‘false’
    Newz(42, fb_ary->cb_abuf, size * max_len, ub1);
    ^

    “dbdimp.c”, line 315: warning #4276-D: relational operator “>” always
    evaluates to ‘false’
    Newz(42, fb_ary->abuf, size * bufl, ub1);
    ^

    cc -c -I/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/public -I/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/demo -I/mnt2/disk200/oracle/product/11.2.0/client_2/rdbms/public -I/mnt2/disk200/oracle/product/11.2.0/client_2/plsql/public -I/mnt2/disk200/oracle/product/11.2.0/client_2/network/public -I/opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/auto/DBI -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DSitanium2 +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fast +Ofltacc=strict -DVERSION=”1.23″ -DXS_VERSION=”1.23″ +Z “-I/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE” -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=”11.2.0.1″ oci8.c
    (Bundled) cc: warning 922: “-Ae” is unsupported in the bundled compiler, ignored.
    (Bundled) cc: warning 922: “-fast” is unsupported in the bundled compiler, ignored.
    (Bundled) cc: warning 922: “+Ofltacc=strict” is unsupported in the bundled compiler, ignored.
    “oci8.c”, line 396: warning #2236-D: controlling expression is constant
    && OCIErrorGet_log_stat(errhp, recno, (text*)NULL, &eg_errcode, errbuf,
    ^

    “oci8.c”, line 1235: warning #4276-D: relational operator “>” always evaluates
    to ‘false’
    New(42, buffer, buflen, ub1);
    ^

    Running Mkbootstrap for DBD::Oracle ()
    chmod 644 Oracle.bs
    rm -f blib/arch/auto/DBD/Oracle/Oracle.so
    LD_RUN_PATH=”/mnt2/disk200/oracle/product/11.2.0/client_2/lib:/usr/lib/hpux32″ /usr/bin/ld -b +vnocompatwarnings -L/usr/lib/hpux32 Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so
    -L/mnt2/disk200/oracle/product/11.2.0/client_2/lib/ -lclntsh -lrt -ldl -lm -lpthread -lnsl -lunwind -ldiskown -ldl -lm -lpthread -lrt -lpthread

    ld: Mismatched ABI for -lclntsh, found /mnt2/disk200/oracle/product/11.2.0/client_2/lib//libclntsh.so
    Fatal error.
    *** Error exit code 1

    Stop.

  35. Hi Gurus,

    Sorry i have to post in someone else thread but i have a problem with my DBD:oracle module.

    It works okay when i run scripts as root but when i use any other user in the box i get the below error. Kindly assist

    install_driver(Oracle) failed: Can’t load ‘/opt/ActivePerl-5.12/site/lib/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /opt/ActivePerl-5.12/lib/DynaLoader.pm line 201.
    at (eval 8) line 3
    Compilation failed in require at (eval 8) line 3.
    Perhaps a required shared library or dll isn’t installed where expected
    at /home/enguli/AvailableDrivers.pl line 39

  36. Hi i want to install the oralce::dbd on my unbuntu-10.4 lts server but it fails with
    perl Makefile.PL
    Multiple copies of Driver.xst found in: /omd/sites/dvz1/lib/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/auto/DBI/ /usr/lib/perl5/auto/DBI/ at Makefile.PL line 37
    Using DBI 1.616 (for perl 5.010001 on x86_64-linux-gnu-thread-multi) installed in /omd/sites/dvz1/lib/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/auto/DBI/

    Configuring DBD::Oracle for perl 5.010001 on linux (x86_64-linux-gnu-thread-multi)

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

    Installing on a linux, Ver#2.6
    Using Oracle in /usr/lib/oracle/11.2/client64
    Can’t create define.sql: Permission denied at Makefile.PL line 1548.
    print() on closed filehandle FH at Makefile.PL line 1549.

    any hints for that?
    best regards olly

    • Hi Olly,

      This is a common problem and I’ve run into it several times. The fix is simple, just choose one of the Driver.xst files and delete it. Do NOT delete both! Just one 🙂

      Cheers,
      Vinny

  37. Hi Vinny

    thx it works now!

    regards
    olly

  38. Vinny:

    I ran the make test with an ORACLE_USERID env var set to what looks correct, and it just seems like I’ve missed something…if you don’t mind, I’m attaching my make test output…any suggestion would be appreciated:

    [email protected]:~/.cpan/build/DBD-Oracle-1.30-RSvcwB$ make test
    PERL_DL_NONLAZY=1 /usr/bin/perl “-MExtUtils::Command::MM” “-e” “test_harness(0, ‘blib/lib’, ‘blib/arch’)” t/*.t
    t/01base.t ………….. # Test loading DBI, DBD::Oracle and version
    t/01base.t ………….. ok
    t/10general.t ……….. skipped: Unable to connect to Oracle
    t/12impdata.t ……….. skipped: Unable to connect to Oracle
    t/14threads.t ……….. skipped: Unable to connect to Oracle
    t/15nls.t …………… skipped: Unable to connect to Oracle
    t/20select.t ………… skipped: Unable to connect to oracle
    t/21nchar.t …………. skipped: Unable to connect to Oracle
    t/22nchar_al32utf8.t …. skipped: Unable to connect to Oracle
    t/22nchar_utf8.t …….. skipped: Unable to connect to Oracle
    t/23wide_db.t ……….. skipped: Unable to connect to Oracle
    t/23wide_db_8bit.t …… skipped: Unable to connect to Oracle
    t/23wide_db_al32utf8.t .. skipped: Unable to connect to Oracle
    t/24implicit_utf8.t ….. skipped: Unable to connect to Oracle
    t/25plsql.t …………. skipped: Unable to connect to Oracle
    t/26exe_array.t ……… skipped: Unable to connect to Oracle
    t/28array_bind.t …….. skipped: Unable to connect to Oracle
    t/30long.t ………….. skipped: Unable to connect to Oracle
    t/31lob.t …………… skipped: see RT#69350
    t/31lob_extended.t …… skipped: Unable to connect to Oracle
    t/32xmltype.t ……….. skipped: Unable to connect to Oracle
    t/34pres_lobs.t ……… skipped: Unable to connect to Oracle
    t/36lob_leak.t ………. skipped: Unable to connect to Oracle
    t/38taf.t …………… *** glibc detected *** /usr/bin/perl: malloc(): memory corruption: 0x08edd910 ***
    ======= Backtrace: =========
    /lib/tls/i686/cmov/libc.so.6(+0x6b591)[0x400dd591]
    /lib/tls/i686/cmov/libc.so.6(+0x6e395)[0x400e0395]
    /lib/tls/i686/cmov/libc.so.6(__libc_malloc+0x5c)[0x400e1f9c]
    /lib/ld-linux.so.2(+0xd8f4)[0x4000d8f4]
    /lib/ld-linux.so.2(+0xdb38)[0x4000db38]
    /lib/ld-linux.so.2(+0x95d8)[0x400095d8]
    /lib/tls/i686/cmov/libc.so.6(+0x104855)[0x40176855]
    /lib/tls/i686/cmov/libc.so.6(_dl_sym+0x1a)[0x40176c3a]
    /lib/tls/i686/cmov/libdl.so.2(+0xdb8)[0x4002edb8]
    /lib/ld-linux.so.2(+0xd7e6)[0x4000d7e6]
    /lib/tls/i686/cmov/libdl.so.2(+0x109c)[0x4002f09c]
    /lib/tls/i686/cmov/libdl.so.2(dlsym+0x5c)[0x4002ed4c]
    /usr/local/oracle/instantclient_11_2/libclntsh.so.11.1(+0x758aea)[0x40b2caea]
    /usr/local/oracle/instantclient_11_2/libclntsh.so.11.1(skgsninit+0x3d)[0x40b2c9f3]
    /usr/local/oracle/instantclient_11_2/libclntsh.so.11.1(skgminit+0xa8)[0x40b2c640]
    /usr/local/oracle/instantclient_11_2/libclntsh.so.11.1(kpuiniPG+0x10f)[0x40661def]
    /usr/local/oracle/instantclient_11_2/libclntsh.so.11.1(kpuinit0+0xd3c)[0x40665cb6]
    /usr/local/oracle/instantclient_11_2/libclntsh.so.11.1(kpuenvcr+0x114)[0x40664ec6]
    /usr/local/oracle/instantclient_11_2/libclntsh.so.11.1(OCIEnvNlsCreate+0x53)[0x411794c3]
    /home/sysadmin/.cpan/build/DBD-Oracle-1.30-RSvcwB/blib/arch/auto/DBD/Oracle/Oracle.so(ora_db_login6+0x29e7)[0x403ab467]
    /home/sysadmin/.cpan/build/DBD-Oracle-1.30-RSvcwB/blib/arch/auto/DBD/Oracle/Oracle.so(XS_DBD__Oracle__db__login+0x17b)[0x4039b94b]
    /usr/bin/perl(Perl_pp_entersub+0x533)[0x80d5af3]
    /usr/bin/perl(Perl_runops_standard+0x18)[0x80d3ee8]
    /usr/bin/perl(Perl_call_sv+0x175)[0x807bbf5]
    /usr/local/lib/perl/5.10.1/auto/DBI/DBI.so(XS_DBI_dispatch+0x12da)[0x403762fa]
    /usr/bin/perl(Perl_pp_entersub+0x533)[0x80d5af3]
    /usr/bin/perl(Perl_runops_standard+0x18)[0x80d3ee8]
    /usr/bin/perl(perl_run+0x342)[0x807c8e2]
    /usr/bin/perl(main+0xed)[0x806437d]
    /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x40088bd6]
    /usr/bin/perl[0x80641f1]
    ======= Memory map: ========
    08048000-08174000 r-xp 00000000 fb:04 1266 /usr/bin/perl
    08174000-08175000 r–p 0012b000 fb:04 1266 /usr/bin/perl
    08175000-08177000 rw-p 0012c000 fb:04 1266 /usr/bin/perl
    08c29000-08f20000 rw-p 00000000 00:00 0 [heap]
    40000000-4001b000 r-xp 00000000 fb:03 130356 /lib/ld-2.11.1.so
    4001b000-4001c000 r–p 0001a000 fb:03 130356 /lib/ld-2.11.1.so
    4001c000-4001d000 rw-p 0001b000 fb:03 130356 /lib/ld-2.11.1.so
    4001d000-4001e000 r-xp 00000000 00:00 0 [vdso]
    4001e000-40020000 rw-p 00000000 00:00 0
    40020000-40021000 r–p 00000000 fb:04 2921 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION
    40021000-40028000 r–s 00000000 fb:04 205 /usr/lib/gconv/gconv-modules.cache
    40028000-40029000 r–p 00000000 fb:04 2920 /usr/lib/locale/en_US.utf8/LC_MEASUREMENT
    40029000-4002a000 r–p 00000000 fb:04 2919 /usr/lib/locale/en_US.utf8/LC_TELEPHONE
    4002a000-4002b000 r–p 00000000 fb:04 2918 /usr/lib/locale/en_US.utf8/LC_ADDRESS
    4002b000-4002c000 r–p 00000000 fb:04 2917 /usr/lib/locale/en_US.utf8/LC_NAME
    4002c000-4002d000 r–p 00000000 fb:04 2916 /usr/lib/locale/en_US.utf8/LC_PAPER
    4002d000-4002e000 r–p 00000000 fb:04 2915 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
    4002e000-40030000 r-xp 00000000 fb:03 130854 /lib/tls/i686/cmov/libdl-2.11.1.so
    40030000-40031000 r–p 00001000 fb:03 130854 /lib/tls/i686/cmov/libdl-2.11.1.so
    40031000-40032000 rw-p 00002000 fb:03 130854 /lib/tls/i686/cmov/libdl-2.11.1.so
    40032000-40056000 r-xp 00000000 fb:03 130855 /lib/tls/i686/cmov/libm-2.11.1.so
    40056000-40057000 r–p 00023000 fb:03 130855 /lib/tls/i686/cmov/libm-2.11.1.so
    40057000-40058000 rw-p 00024000 fb:03 130855 /lib/tls/i686/cmov/libm-2.11.1.so
    40058000-40059000 rw-p 00000000 00:00 0
    40059000-4006e000 r-xp 00000000 fb:03 130866 /lib/tls/i686/cmov/libpthread-2.11.1.so
    4006e000-4006f000 r–p 00014000 fb:03 130866 /lib/tls/i686/cmov/libpthread-2.11.1.so
    4006f000-40070000 rw-p 00015000 fb:03 130866 /lib/tls/i686/cmov/libpthread-2.11.1.so
    40070000-40072000 rw-p 00000000 00:00 0
    40072000-401c5000 r-xp 00000000 fb:03 130851 /lib/tls/i686/cmov/libc-2.11.1.so
    401c5000-401c6000 —p 00153000 fb:03 130851 /lib/tls/i686/cmov/libc-2.11.1.so
    401c6000-401c8000 r–p 00153000 fb:03 130851 /lib/tls/i686/cmov/libc-2.11.1.so
    401c8000-401c9000 rw-p 00155000 fb:03 130851 /lib/tls/i686/cmov/libc-2.11.1.so
    401c9000-401cc000 rw-p 00000000 00:00 0
    401cc000-401d5000 r-xp 00000000 fb:03 130853 /lib/tls/i686/cmov/libcrypt-2.11.1.so
    401d5000-401d6000 r–p 00008000 fb:03 130853 /lib/tls/i686/cmov/libcrypt-2.11.1.so
    401d6000-401d7000 rw-p 00009000 fb:03 130853 /lib/tls/i686/cmov/libcrypt-2.11.1.so
    401d7000-401ff000 rw-p 00000000 00:00 0
    401ff000-40200000 r–p 00000000 fb:04 2913 /usr/lib/locale/en_US.utf8/LC_MONETARY
    40200000-4031e000 r–p 00000000 fb:04 2912 /usr/lib/locale/en_US.utf8/LC_COLLATE
    4031e000-4031f000 r–p 00000000 fb:04 2911 /usr/lib/locale/en_US.utf8/LC_TIME
    4031f000-40320000 r–p 00000000 fb:04 2910 /usr/lib/locale/en_US.utf8/LC_NUMERIC
    40320000-4035f000 r–p 00000000 fb:04 2909 /usr/lib/locale/en_US.utf8/LC_CTYPE
    4035f000-4037f000 r-xp 00000000 fb:05 391124 /usr/local/lib/perl/5.10.1/auto/DBI/DBI.so
    4037f000-40380000 r–p 00020000 fb:05 391124 /usr/local/lib/perl/5.10.1/auto/DBI/DBI.so
    40380000-40381000 rw-p 00021000 fb:05 391124 /usr/local/lib/perl/5.10.1/auto/DBI/DBI.so
    40381000-4038a000 r-xp 00000000 fb:04 1272 /usr/lib/perl/5.10.1/auto/List/Util/Util.so
    4038a000-4038b000 r–p 00008000 fb:04 1272 /usr/lib/perl/5.10.1/auto/List/Util/Util.so
    4038b000-4038c000 rw-p 00009000 fb:04 1272 /usr/lib/perl/5.10.1/auto/List/Util/Util.so
    4038c000-403d2000 r-xp 00000000 fb:01 6653 /home/sysadmin/.cpan/build/DBD-Oracle-1.30-RSvcwB/blib/arch/auto/DBD/Oracle/Oracle.so
    403d2000-403d3000 r–p 00046000 fb:01 6653 /home/sysadmin/.cpan/build/DBD-Oracle-1.30-RSvcwB/blib/arch/auto/DBD/Oracle/Oracle.so
    403d3000-403d4000 rw-p 00047000 fb:01 6653 /home/sysadmin/.cpan/build/DBD-Oracle-1.30-RSvcwB/blib/arch/auto/DBD/Oracle/Oracle.so
    403d4000-42282000 r-xp 00000000 fb:05 22 /usr/local/oracle/instantclient_11_2/libclntsh.so.11.1
    42282000-42370000 rw-p 01ead000 fb:05 22 /usr/local/oracle/instantclient_11_2/libclntsh.so.11.1
    42370000-4238a000 rw-p 00000000 00:00 0
    4238a000-425a9000 r-xp 00000000 fb:05 23 /usr/local/oracle/instantclient_11_2/libnnz11.so
    425a9000-425d7000 rw-p 0021e000 fb:05 23 /usr/local/oracle/instantclientt/38taf.t …………… No subtests run
    t/40ph_type.t ……….. skipped: Unable to connect to Oracle
    t/50cursor.t ………… skipped: Unable to connect to Oracle
    t/51scroll.t ………… skipped: Unable to connect to Oracle
    t/55nested.t ………… skipped: Unable to connect to Oracle
    t/56embbeded.t ………. skipped: Unable to connect to Oracle
    t/58object.t ………… skipped: Unable to connect to Oracle
    t/60reauth.t ………… skipped: ORACLE_USERID_2 not defined.
    t/70meta.t ………….. skipped: Unable to connect to Oracle
    t/80ora_charset.t ……. skipped: Unable to connect to Oraclee

    Test Summary Report
    ——————-
    t/38taf.t (Wstat: 6 Tests: 0 Failed: 0)
    Non-zero wait status: 6
    Parse errors: No plan found in TAP output
    Files=32, Tests=6, 8 wallclock secs ( 0.10 usr 0.56 sys + 2.26 cusr 3.24 csys = 6.16 CPU)
    Result: FAIL
    Failed 1/32 test programs. 0/6 subtests failed.
    make: *** [test_dynamic] Error 255
    [email protected]:~/.cpan/build/DBD-Oracle-1.30-RSvcwB$

    • Hi Don.

      Well, the obvious issue is that the test script can’t connect to Oracle :). Can you connect to oracle using sqlplus? Did you set up your entry in tnsnames.ora?

      Cheers,
      Vinny

  39. Hi Expert,
    I try to install DBD-Oracle CPAN module to Solaris
    >> SunOS mtg-suramapp-01 5.10 Generic_144488-17 sun4v sparc sun4v <>>>>>>>>>>>>>>>>>> environments
    -bash-3.00$ env
    LD_LIBRARY_PATH=/oracle/1120/client/lib:/oracle/1120/client/rdbms/lib
    PATH=.:/usr/bin:/oracle/1120/client/bin
    ORACLE_HOME=/oracle/1120/client

    -bash-3.00$ ls $ORACLE_HOME/rdbms/demo
    aqxml.conf
    -bash-3.00$

    >>>>>>>>>>> I cannot find those files on my Oracle client as below !!

    -bash-3.00$ find $ORACLE_HOME -name *.mk
    find: cannot read dir /oracle/1120/client/inventory: Permission denied
    /oracle/1120/client/crs/lib/env_has.mk
    /oracle/1120/client/ldap/lib/env_ldap.mk
    /oracle/1120/client/ldap/lib/ins_ldap.mk
    /oracle/1120/client/network/lib/ins_nau.mk
    /oracle/1120/client/network/lib/env_network.mk
    /oracle/1120/client/network/lib/ins_net_client.mk
    find: cannot read dir /oracle/1120/client/network/log: Permission denied
    find: cannot read dir /oracle/1120/client/network/trace: Permission denied
    /oracle/1120/client/odbc/lib/env_odbc.mk
    /oracle/1120/client/odbc/lib/ins_odbc.mk
    find: cannot read dir /oracle/1120/client/opmn/conf: Permission denied
    find: cannot read dir /oracle/1120/client/opmn/logs: Permission denied
    /oracle/1120/client/ord/im/lib/env_ordim.mk
    /oracle/1120/client/plsql/lib/env_plsql.mk
    /oracle/1120/client/plsql/lib/ins_plsql.mk
    /oracle/1120/client/precomp/lib/env_precomp.mk
    /oracle/1120/client/precomp/lib/ins_precomp.mk
    /oracle/1120/client/rdbms/lib/env_rdbms.mk
    /oracle/1120/client/rdbms/lib/ins_rdbms.mk
    /oracle/1120/client/sqlplus/lib/env_sqlplus.mk
    /oracle/1120/client/sqlplus/lib/ins_sqlplus.mk
    /oracle/1120/client/srvm/lib/env_srvm.mk
    /oracle/1120/client/srvm/lib/ins_srvm.mk
    find: cannot read dir /oracle/1120/client/cfgtoollogs: Permission denied

    • Hi PJ,

      I’m pretty sure your troubles are related to the permission errors you’re getting. Make sure you use an account that has at least read/execute permissions on the directories and read permissions on the files.

      Vinny

      • Thank you Vinny, this error is solved by put ‘-m $ORACLE_HOME/rdbms/lib/ins_rdbms.mk’.
        However, I got ‘wrong ELF class: ELFCLASS64’ error during ‘make’ step. I try to find ‘$ORACLE_HOME/lib32′ as forum suggest but unlucky that it doesn’t appear in oracle client directory.
        Could you suggest me how to solve this again please ?
        Thank you very much for advance.

        -bash-3.00$ make
        rm -f blib/arch/auto/DBD/Oracle/Oracle.so
        LD_RUN_PATH=”/oracle/1120/client/lib:/lib” cc -G Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so -L/oracle/1120/client/lib/ -lclntsh -lkstat -lnsl -lsocket -lresolv -lgen -ldl -lsched -lrt -lc -laio -lposix4 -lpool -lm -lthread -lpthread
        ld: fatal: file /oracle/1120/client/lib//libclntsh.so: wrong ELF class: ELFCLASS64
        ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/Oracle/Oracle.so
        *** Error code 1
        make: Fatal error: Command failed for target `blib/arch/auto/DBD/Oracle/Oracle.so’

        -bash-3.00$ ls $ORACLE_HOME
        OPatch deinstall jpub ord sqldeveloper
        assistants diagnostics ldap oui sqlj
        bin has lib owm sqlplus
        cdata hs log perl srvm
        cfgtoollogs install network plsql sysman
        clone instantclient nls precomp ucp
        crs inventory odbc racg uix
        csmig javavm olap rdbms usm
        css jdbc opmn relnotes utl
        cv jdk oraInst.loc root.sh wwg
        dc_ocm jlib oracore slax xdk
        -bash-3.00$

    • Pls see next Post for more detail…

  40. Hi Expert,
    I try to install DBD-Oracle CPAN module to Solaris
    [ SunOS mtg-suramapp-01 5.10 Generic_144488-17 sun4v sparc sun4v ]
    But I always got this error message. Could you help me investigate and guide me the solution ?
    Below are information that I do… Thank you very much for advanced.

    -bash-3.00$ pwd
    /tmp/app/cpan/DBD-Oracle-1.34

    -bash-3.00$ perl Makefile.PL
    Multiple copies of Driver.xst found in: /usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBI/ /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int/auto/DBI/ at Makefile.PL line 39
    Using DBI 1.616 (for perl 5.008004 on sun4-solaris-64int) installed in /usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBI/

    Configuring DBD::Oracle for perl 5.008004 on solaris (sun4-solaris-64int)

    Installing on a solaris, Ver#2.10
    Using Oracle in /oracle/1120/client
    DEFINE _SQLPLUS_RELEASE = “1102000300” (CHAR)
    Oracle version 11.2.0.3 (11.2)

    Unable to locate an oracle.mk or other suitable *.mk
    file in your Oracle installation. (I looked in
    /oracle/1120/client/rdbms/demo/demo_xe.mk /oracle/1120/client/rdbms/demo/demo_rdbms32.mk under /oracle/1120/client)

    The oracle.mk (or demo_rdbms.mk) file is part of the Oracle
    RDBMS product. You need to build DBD::Oracle on a
    system which has one of these Oracle components installed.
    (Other *.mk files such as the env_*.mk files will not work.)
    Alternatively you can use Oracle Instant Client.

    In the unlikely event that a suitable *.mk file is installed
    somewhere non-standard you can specify where it is using the -m option:
    perl Makefile.PL -m /path/to/your.mk

    See the appropriate README file for your OS for more information and some alternatives.

    at Makefile.PL line 1185.

    ……. environments

    -bash-3.00$ env
    LD_LIBRARY_PATH=/oracle/1120/client/lib:/oracle/1120/client/rdbms/lib
    PATH=.:/usr/bin:/oracle/1120/client/bin
    ORACLE_HOME=/oracle/1120/client

    -bash-3.00$ ls $ORACLE_HOME/rdbms/demo
    aqxml.conf
    -bash-3.00$

    …I cannot find those files on my Oracle client as below !!

    -bash-3.00$ find $ORACLE_HOME -name *.mk
    find: cannot read dir /oracle/1120/client/inventory: Permission denied
    /oracle/1120/client/crs/lib/env_has.mk
    /oracle/1120/client/ldap/lib/env_ldap.mk
    /oracle/1120/client/ldap/lib/ins_ldap.mk
    /oracle/1120/client/network/lib/ins_nau.mk
    /oracle/1120/client/network/lib/env_network.mk
    /oracle/1120/client/network/lib/ins_net_client.mk
    find: cannot read dir /oracle/1120/client/network/log: Permission denied
    find: cannot read dir /oracle/1120/client/network/trace: Permission denied
    /oracle/1120/client/odbc/lib/env_odbc.mk
    /oracle/1120/client/odbc/lib/ins_odbc.mk
    find: cannot read dir /oracle/1120/client/opmn/conf: Permission denied
    find: cannot read dir /oracle/1120/client/opmn/logs: Permission denied
    /oracle/1120/client/ord/im/lib/env_ordim.mk
    /oracle/1120/client/plsql/lib/env_plsql.mk
    /oracle/1120/client/plsql/lib/ins_plsql.mk
    /oracle/1120/client/precomp/lib/env_precomp.mk
    /oracle/1120/client/precomp/lib/ins_precomp.mk
    /oracle/1120/client/rdbms/lib/env_rdbms.mk
    /oracle/1120/client/rdbms/lib/ins_rdbms.mk
    /oracle/1120/client/sqlplus/lib/env_sqlplus.mk
    /oracle/1120/client/sqlplus/lib/ins_sqlplus.mk
    /oracle/1120/client/srvm/lib/env_srvm.mk
    /oracle/1120/client/srvm/lib/ins_srvm.mk
    find: cannot read dir /oracle/1120/client/cfgtoollogs: Permission denied

  41. You need to set LD_LIBRARY_PATH with oracle 32bit or 64 bit lib path as per perl version

  42. Thank you very much after all I am able to install perl with oracle!

  43. best guide out there… works for ubunutu 12.10 too

  44. I have install perl and oracle client on linux redhat. I can connect to database using the perl by running the perl script through the command line, however when I try to access the oracale data base through Apache (web browser) I get error on browser:

    ***********
    Internal Server Error:
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Apache/2.2.3 (Red Hat) Server at 10.1.245.30 Port 80

    ***********
    and when I look at the /var/log/httpd/error_log I see this error message on the error_log file:

    ************
    install_driver(Oracle) failed:
    Can’t load ‘/usr/lib/perl5/site_perl/5.8.8//i386-linux-thread-multi/auto/DBD/Oracle/Oracle.so’
    for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at
    /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230. at (eval 42) line 3
    Compilation failed in require at (eval 42) line 3. Perhaps a required shared library or dll isn’t installed where expected
    at /var/www/html/AspDbiTest.asp line 10 , /usr/lib/perl5/site_perl/5.8.8/Apache/ASP.pm line 1522
    *****************
    I checked and I have all the files in the directory that is complaining and have the read and execute right.
    Can somebody please help me and tall me what is going on. I have spend too much time on it and can’t figure out what is going on.

    • Hi Kathy,

      Most likely you have different Perl installs, where DBD::Oracle is intalled in one but not the other. Check perl -v in the command line and make sure you’re using the same version/install path. If you are, then check your environment variables in the command line and make sure they have matching values in your Apache setup (e.g. the LD_LIBRARY_PATH).

      Cheers,
      Vinny

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.