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

We have downloaded Perl (Binary) from http://www.bull.de/ and using smit we installed it on AIX 4.3.2,the installation was cool with Perl being installed in /usr/local/ , the CGI.pm files were rightly created in /usr/local/lib/perl5/5.6.0 and could be accessed in the perl programs using use CGI; We are looking for database connectivity and for this we downloaded DBI and DBD for Oracle (tar.gZ) files and after unzipping it we had the files sitting in /usr/local/lib/perl5/5.6.0/DBI-1.14 (DBI related Makefile.PL etc) and /usr/local/lib/perl5/5.6.0/DBD-Oracle-1.06 (DBD related Makefile.PL etc). We went ahead with make Makefile.PL and the other instructions documented. Our Oracle environment has also been set up properly by having correct ORACLE_SID and TWO_TASK and can be connected by a client. But on running a perl script we get this error : Can't locate loadable object for module DBI in @INC (@INC.. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.0/aix/DB I.pm line 182. Pls advise.. Do we need to (re)make perl as we did for DBI and DBD

Replies are listed 'Best First'.
Re: Problem Using DBI , DBD
by davorg (Chancellor) on Dec 21, 2000 at 14:47 UTC

    Did you get any errors during the

    perl Makefile.PL make make test make install

    process?

    Generally I don't install modules from within the Perl library area. I untar the files into my home directory and run the 'make' and 'make test' from there. The 'make install' will then put the file in the correct place.

    Also, I'm uneasy about using pre-built Perl binaries as they always make assumptions about the setup of your box. IMO, it's always a better idea to build Perl from scratch.

      There were quite a lot of messages that scrolled past, but the Makefile was giving a problem, our DBA commented out those lines as the comments said that that code was for backward compatibility, the whole thing went off smoothly then. Would you recommend to remake perl, could I do that alone or do I need to remake DBI and DBD as well. Could I have the steps so that I don't miss any this time. According to me : 1) Download Perl (Not the binary which I did) 2) Make Perl 3) Download DBI , DBD for Oracle 4) Make DBI Install... 5) Make DBD Install... Do I need to set anything in my $PATH. I can run simple perl scripts which uses CGI. Does it look into different directories for CGI and DBI, I have quite a few of these DBI hanging around now, how can I be sure that the correct one is being used.

        I'd recommend building and installing perl, DBI and DBD::Oracle from scratch.

        You can find out which directories perl searches for libraries by examining the contents of the @INC array or typing

        perl -V

        at your command line.

        --
        <http://www.dave.org.uk>

        "Perl makes the fun jobs fun
        and the boring jobs bearable" - me

        Somehow something didn't get built or installed. When building all of this, it'll create an Oracle.so file and place it in its proper place in your Perl lib directory. If you're getting that message, that means it didn't make it there. It may have failed to build (and somehow any indication of it disappeared with your commenting in the Makefile), you failed to execute a 'make install', it installed somewhere else, or something bizarre. Did you have to tinker with your installation after you installed DBI/DBD::Oracle?