Perl & DBI cannot locate

I just installed:
perl 5.8.7 + defined-or + DBI 1.48 + Tk 804.027 built with gcc-4.0.0
From:
http://mirrors.develooper.com/hpux/downloads.html

I was under the assumption that the DBI module was installed.
When I do:
perldoc DBI
I get the docs for DBI

But when I try to use DBI I get an error...
Can't locate DBI.pm in [at] INC ( [at] INC contains:
/opt/perl64/lib/5.8.8/PA-RISC2.0-LP64 /opt/perl64/lib/5.8.8
/opt/perl64/lib/site_perl/5.8.8/PA-RISC2.0-LP64
/opt/perl64/lib/site_perl/5.8.8 /opt/perl64/lib/site_perl .) at test2
line 27.
BEGIN failed--compilation aborted at test2 line 27.

My path points to /usr/bin/perl.
lrwxr-xr-x 1 root sys 20 Nov 20 11:56 /usr/bin/perl ->
/opt/perl64/bin/perl

How can I tell if it is installed, or do I still need to install this.
Do I also need the oracle driver?
LHradowy [ Mo, 20 November 2006 20:07 ] [ ID #1542428 ]

Re: Perl & DBI cannot locate

LHradowy wrote:
> I just installed:
> perl 5.8.7 + defined-or + DBI 1.48 + Tk 804.027 built with gcc-4.0.0
> From:
> http://mirrors.develooper.com/hpux/downloads.html
>
> I was under the assumption that the DBI module was installed.
> When I do:
> perldoc DBI
> I get the docs for DBI
>
> But when I try to use DBI I get an error...
> Can't locate DBI.pm in [at] INC ( [at] INC contains:
> /opt/perl64/lib/5.8.8/PA-RISC2.0-LP64 /opt/perl64/lib/5.8.8
> /opt/perl64/lib/site_perl/5.8.8/PA-RISC2.0-LP64
> /opt/perl64/lib/site_perl/5.8.8 /opt/perl64/lib/site_perl .) at test2
> line 27.
> BEGIN failed--compilation aborted at test2 line 27.
>
> My path points to /usr/bin/perl.
> lrwxr-xr-x 1 root sys 20 Nov 20 11:56 /usr/bin/perl ->
> /opt/perl64/bin/perl
>
> How can I tell if it is installed, or do I still need to install this.
> Do I also need the oracle driver?

You tell us. You said you installed it. Did you or didn't you?

You said you got the docs for DBI. I presume this means you used
perldoc to find them? You can ask perldoc for the location of the
module...

perldoc -l DBI

If that fails, the obvious way to search for it is to actually try to
`find` it:

find / -name DBI.pm

If it's found, but
perl -MDBI -e1
still gives an error, then your PERL5LIB variable is probably not set
correctly. Update it to include the path of DBI.pm as found from your
`find` command.

And no, DBD::Oracle is not included with DBI. You'll have to install
it separately. Have a read of:
perldoc perlmodinstall

Paul Lalli
Paul Lalli [ Mo, 20 November 2006 20:56 ] [ ID #1542429 ]

Re: Perl & DBI cannot locate

On Mon, 20 Nov 2006 20:07:40 +0100, LHradowy <lhradowy [at] gmail.com> wrote:

> I just installed:
> perl 5.8.7 + defined-or + DBI 1.48 + Tk 804.027 built with gcc-4.0.0
> From:
> http://mirrors.develooper.com/hpux/downloads.html

That's my site :)

> I was under the assumption that the DBI module was installed.

It should be.

# find /opt/perl64 -name DBI.pm

If not, I should check. What OS? 11.11?

> When I do:
> perldoc DBI
> I get the docs for DBI
>
> But when I try to use DBI I get an error...
> Can't locate DBI.pm in [at] INC ( [at] INC contains:
> /opt/perl64/lib/5.8.8/PA-RISC2.0-LP64 /opt/perl64/lib/5.8.8
> /opt/perl64/lib/site_perl/5.8.8/PA-RISC2.0-LP64
> /opt/perl64/lib/site_perl/5.8.8 /opt/perl64/lib/site_perl .) at test2
> line 27.
> BEGIN failed--compilation aborted at test2 line 27.
>
> My path points to /usr/bin/perl.
> lrwxr-xr-x 1 root sys 20 Nov 20 11:56 /usr/bin/perl ->
> /opt/perl64/bin/perl
>
> How can I tell if it is installed, or do I still need to install this.
> Do I also need the oracle driver?
h.m.brand [ Di, 21 November 2006 00:26 ] [ ID #1542434 ]

Re: Perl & DBI cannot locate

Thanks for the software.
Yes I do have it installed.
user [at] medusa$ perldoc -l DBI
/opt/perl/lib/site_perl/5.8.8/PA-RISC2.0/DBI.pm
But, when I do:
user [at] medusa$ perl -MDBI -e1
Can't locate DBI.pm in [at] INC ( [at] INC contains:
/opt/perl64/lib/5.8.8/PA-RISC2.0-LP64 /opt/perl64/lib/5.8.8
/opt/perl64/lib/site_perl/5.8.8/PA-RISC2.0-LP64
/opt/perl64/lib/site_perl/5.8.8 /opt/perl64/lib/site_perl .).
BEGIN failed--compilation aborted.

How do I fix this?
I believe I installed this thru sam, where/how do I modify the search
path...
Would this also be the reason why I get a memory fault when I enter
debug mode?
root [at] medusa # perl -de0
Memory fault(coredump)


H.Merijn Brand wrote:
> On Mon, 20 Nov 2006 20:07:40 +0100, LHradowy <lhradowy [at] gmail.com> wrote:
>
> > I just installed:
> > perl 5.8.7 + defined-or + DBI 1.48 + Tk 804.027 built with gcc-4.0.0
> > From:
> > http://mirrors.develooper.com/hpux/downloads.html
>
> That's my site :)
>
> > I was under the assumption that the DBI module was installed.
>
> It should be.
>
> # find /opt/perl64 -name DBI.pm
>
> If not, I should check. What OS? 11.11?
>
> > When I do:
> > perldoc DBI
> > I get the docs for DBI
> >
> > But when I try to use DBI I get an error...
> > Can't locate DBI.pm in [at] INC ( [at] INC contains:
> > /opt/perl64/lib/5.8.8/PA-RISC2.0-LP64 /opt/perl64/lib/5.8.8
> > /opt/perl64/lib/site_perl/5.8.8/PA-RISC2.0-LP64
> > /opt/perl64/lib/site_perl/5.8.8 /opt/perl64/lib/site_perl .) at test2
> > line 27.
> > BEGIN failed--compilation aborted at test2 line 27.
> >
> > My path points to /usr/bin/perl.
> > lrwxr-xr-x 1 root sys 20 Nov 20 11:56 /usr/bin/perl ->
> > /opt/perl64/bin/perl
> >
> > How can I tell if it is installed, or do I still need to install this.
> > Do I also need the oracle driver?
LHradowy [ Di, 21 November 2006 00:57 ] [ ID #1542435 ]

Re: Perl & DBI cannot locate

On Tue, 21 Nov 2006 00:57:29 +0100, LHradowy <lhradowy [at] gmail.com> wrote:

> Thanks for the software.
> Yes I do have it installed.
> user [at] medusa$ perldoc -l DBI
> /opt/perl/lib/site_perl/5.8.8/PA-RISC2.0/DBI.pm

11.00 or 11.11?

That is the 32bit version. Cannot be used with the 64bit version of perl

> But, when I do:
> user [at] medusa$ perl -MDBI -e1
> Can't locate DBI.pm in [at] INC ( [at] INC contains:
> /opt/perl64/lib/5.8.8/PA-RISC2.0-LP64 /opt/perl64/lib/5.8.8
> /opt/perl64/lib/site_perl/5.8.8/PA-RISC2.0-LP64
> /opt/perl64/lib/site_perl/5.8.8 /opt/perl64/lib/site_perl .).
> BEGIN failed--compilation aborted.

That is the 64bit perl

> How do I fix this?
> I believe I installed this thru sam, where/how do I modify the search
> path...
> Would this also be the reason why I get a memory fault when I enter
> debug mode?
> root [at] medusa # perl -de0
> Memory fault(coredump)

Ouch. should not happen. I get them too, for GNU gcc builds.

> H.Merijn Brand wrote:
>> On Mon, 20 Nov 2006 20:07:40 +0100, LHradowy <lhradowy [at] gmail.com> wrote:
>>
>> > I just installed:
>> > perl 5.8.7 + defined-or + DBI 1.48 + Tk 804.027 built with gcc-4.0.0
>> > From:
>> > http://mirrors.develooper.com/hpux/downloads.html
>>
>> That's my site :)
>>
>> > I was under the assumption that the DBI module was installed.
>>
>> It should be.
>>
>> # find /opt/perl64 -name DBI.pm
>>
>> If not, I should check. What OS? 11.11?
>>
>> > When I do:
>> > perldoc DBI
>> > I get the docs for DBI
>> >
>> > But when I try to use DBI I get an error...
>> > Can't locate DBI.pm in [at] INC ( [at] INC contains:
>> > /opt/perl64/lib/5.8.8/PA-RISC2.0-LP64 /opt/perl64/lib/5.8.8
>> > /opt/perl64/lib/site_perl/5.8.8/PA-RISC2.0-LP64
>> > /opt/perl64/lib/site_perl/5.8.8 /opt/perl64/lib/site_perl .) at test2
>> > line 27.
>> > BEGIN failed--compilation aborted at test2 line 27.
>> >
>> > My path points to /usr/bin/perl.
>> > lrwxr-xr-x 1 root sys 20 Nov 20 11:56 /usr/bin/perl ->
>> > /opt/perl64/bin/perl
>> >
>> > How can I tell if it is installed, or do I still need to install this.
>> > Do I also need the oracle driver?
h.m.brand [ Di, 21 November 2006 12:38 ] [ ID #1543671 ]

Re: Perl & DBI cannot locate

On Tue, 21 Nov 2006 00:57:29 +0100, LHradowy <lhradowy [at] gmail.com> wrote:

> root [at] medusa # perl -de0
> Memory fault(coredump)

This one is due to optimisation errors in GNU gcc 4.x.x

I have uploaded a completely rebuilt pack of perl-5.8.8 builds,
but now compiled with GNU gcc-3.4.6, in which I have testes that
this error does not happen.

http://mirrors.develooper.com/hpux/#Perl

Enjoy, Have FUN! H.Merijn
h.m.brand [ Mi, 17 Januar 2007 16:08 ] [ ID #1599250 ]
Perl » comp.lang.perl.modules » Perl & DBI cannot locate

Vorheriges Thema: Tips on module selection for shell and/or commandline 'subcommand' behavior
Nächstes Thema: Net::SFTP - setting binary mode on Windows