On 2008-07-28 20:36:23 +0530, Srinivas KATTI wrote:
> I am working on perl assignment which is first perl code in our 
> environment, i have come across following problem, pls if you could 
> provide your expert consultansy it will be great help to me
> 
> I am trying to use DBI in my program (simple program), below is the piece 
> of code
> 
> ************************************************************************************************************************************************
> #!/usr/bin/perl -w
> #use lib '/tools/dev/perl_modules/DBI/1.48/DBI-1.48';
> 
> BEGIN {
>         push @INC,"/tools/dev/perl_modules/DBI/1.48/DBI-1.48";
>         }
> use DBI;
[...]
> when i execute the above program, get the following error
> ************************************************************************************************************************************************
> Can't locate loadable object for module DBI in @INC

On some OSs (notably Solaris) it isn't possible to change the search
path for shared libraries after the program has been loaded. 

> (@INC contains: 
> /usr/perl5/5.00503/sun4-solaris

And I see you are running Solaris, so that might be an issue. You are
also running an extremely old version of perl. If at all possible,
upgrade to a current version: 5.10.0 or at least 5.8.8.

[...]

> the comments specified in DBI.pm says
> 
> # If you get an error here like "Can't find loadable object ..."
> # then you haven't installed the DBI correctly. Read the README
> # then install it again.
> 
> So is this correct? do i need to install it again

How did you install it? Normally, if you install a module, perl knows
how to find it - no messing around with @INC necessary. If you need to
do that, you have already done something strange (not necessarily wrong,
but strange - so you may run into strange problems).

        hp

-- 
   _  | Peter J. Holzer    | Am Anfang war der Bug und der
|_|_) | Sysadmin WSR       | Verantwortliche sprach:
| |   | [EMAIL PROTECTED]      | Es werde ein Testcase.
__/   | http://www.hjp.at/ |    -- Clemens Zauner in dcii

Attachment: pgpIJ75f409tz.pgp
Description: PGP signature

Reply via email to