Click here to get back home

Perl & DBI cannot locate

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Perl & DBI cannot locate LHradowy 11-20-2006
Get Chitika Premium
Posted by LHradowy on November 20, 2006, 2:07 pm
Please log in for more thread options


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 @INC (@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?


Posted by Paul Lalli on November 20, 2006, 2:56 pm
Please log in for more thread options


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 @INC (@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


Posted by H.Merijn Brand on November 20, 2006, 6:26 pm
Please log in for more thread options



> 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 @INC (@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?


Posted by LHradowy on November 20, 2006, 6:57 pm
Please log in for more thread options


Thanks for the software.
Yes I do have it installed.
user@medusa$ perldoc -l DBI
/opt/perl/lib/site_perl/5.8.8/PA-RISC2.0/DBI.pm
But, when I do:
user@medusa$ perl -MDBI -e1
Can't locate DBI.pm in @INC (@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@medusa # perl -de0
Memory fault(coredump)


H.Merijn Brand 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 @INC (@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?


Posted by H.Merijn Brand on November 21, 2006, 6:38 am
Please log in for more thread options



> Thanks for the software.
> Yes I do have it installed.
> user@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@medusa$ perl -MDBI -e1
> Can't locate DBI.pm in @INC (@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@medusa # perl -de0
> Memory fault(coredump)

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

> H.Merijn Brand 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 @INC (@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?

Similar ThreadsPosted
ant locate object method _session_channel via package Net::SSH::Perl::SSH1 July 13, 2006, 6:05 pm
Cant locate object method _session_channel via package Net::SSH::Perl::SSH1 July 13, 2006, 6:15 pm
How to get GIF support with Perl-GD library? (Can't locate object method "newFromGif") June 5, 2007, 4:22 am
can't locate pg January 16, 2005, 6:42 pm
Can't locate Tk/MDI/ChildWindow.pm September 23, 2006, 11:41 pm
Can't locate DBD/ODBC.pm in @INC November 20, 2008, 11:55 am
Can't locate loadable object August 4, 2005, 12:18 am
Can't locate loadable object for module June 22, 2005, 12:37 pm
Can't locate object method "ymd" via package... August 3, 2007, 6:14 am
Module problem - Can't locate Mail/Sender.pm in @INC October 22, 2004, 11:19 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap