Re: Perl+DBI question [C1]



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:
| | | hjp@xxxxxxxxx | Es werde ein Testcase.
__/ | http://www.hjp.at/ | -- Clemens Zauner in dcii

Attachment: pgpqYqdAd2Xs9.pgp
Description: PGP signature



Relevant Pages

  • Errors in DBI installation!!
    ... I am getting the errors when trying to install DBI module. ... Perl versions below 5.6.1 are no longer supported by the DBI. ... *** Error code 1 ...
    (perl.dbi.users)
  • Problem of DBI build
    ... I installed Oracle Application Server 4.0.8.2 included perl module. ... I need to installe DBI and DBD::Oracle module. ... You can install them any time after installing the DBI. ... line 318: error 1705: Function prototypes are an ANSI feature. ...
    (perl.dbi.users)
  • Fwd: DBI install error,can you help me?
    ... Are you sure the compiler you have is the one used to build Perl? ... I try to install the DBI package but it failed. ... d declaration specifiers or '...' ...
    (perl.dbi.users)
  • Re: Unable to install DBD::ODBC on OSX Leopard 10.5.2
    ... Have you installed a newer DBI? ... Subject: Unable to install DBD::ODBC on OSX Leopard 10.5.2 ... the same assignment fails in line 336. ... Marble Bar Asset Management LLP is regulated and authorised by the FSA. ...
    (perl.dbi.users)
  • Problem of DBI build
    ... I installed Oracle Application Server 4.0.8.2 included perl module. ... I need to installe DBI and DBD::Oracle module. ... You can install them any time after installing the DBI. ... line 318: error 1705: Function prototypes are an ANSI feature. ...
    (perl.dbi.users)