DBI/DBD question

H

Huub

Hi,

I want to make DBD-mysql and have DBI.pm in /usr/local/lib/perl5/5.8.7

[huub@Paarl DBD-mysql-3.0004]$ perl Makefile.PL
Can't locate DBI/DBD.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.8.7/i686-linux /usr/local/lib/perl5/5.8.7
/usr/local/lib/perl5/site_perl/5.8.7/i686-linux
/usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl .)
at Makefile.PL line 23.

I've been looking for DBI/DBD.pm but can't find it. Any suggestions on
what to do?

Thanks,

Huub
 
O

Owen

Huub said:
I want to make DBD-mysql and have DBI.pm in /usr/local/lib/perl5/5.8.7

[huub@Paarl DBD-mysql-3.0004]$ perl Makefile.PL
Can't locate DBI/DBD.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.8.7/i686-linux /usr/local/lib/perl5/5.8.7
/usr/local/lib/perl5/site_perl/5.8.7/i686-linux
/usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl .)
at Makefile.PL line 23.

I've been looking for DBI/DBD.pm but can't find it. Any suggestions on
what to do?

http://search.cpan.org and look for DBD

You most likely need to install DBI::DBD
 
D

David Squire

Huub said:
I did. I downloaded DBI.pm and copied it in /usr/local/lib/perl5/5.8.7/.
Isn't that good?

No. The easiest way to install modules is use the CPAN module, to ensure
that all dependencies are satisfied, and C code is compiled etc. etc. If
you choose not to use CPAN, you should still do a proper install, not
just copy files. You need to download the whole tarball, not just DBI.pm.

Finally, as the OP suggested, DBI::DBD is not the same module as DBI.

If you do (as root):
perl -MCPAN -e shell

and then type "install DBI::DBD" you will be on the right track.


DS
 
B

Brian Wakem

David said:
Finally, as the OP suggested, DBI::DBD is not the same module as DBI.

If you do (as root):


FWIW on most Linux systems (and probably other unix-like systems) you can
simply type "cpan"
 
M

Matt Garrish

Huub said:
I did. I downloaded DBI.pm and copied it in /usr/local/lib/perl5/5.8.7/.
Isn't that good?

No. It sounds like you grabbed the source for the one file, when there are
many dependencies and other compiled code that has to be installed. Use the
cpan shell to install modules

perl -MCPAN -e shell

Matt
 
H

Huub

No. The easiest way to install modules is use the CPAN module, to ensure
that all dependencies are satisfied, and C code is compiled etc. etc. If
you choose not to use CPAN, you should still do a proper install, not
just copy files. You need to download the whole tarball, not just DBI.pm.

Finally, as the OP suggested, DBI::DBD is not the same module as DBI.

If you do (as root):


and then type "install DBI::DBD" you will be on the right track.


DS

Ok, that works better. Question though: I tried to install DBD::mysql as
well. This failed because it didn't find a running MySQL server on the
machine..which is correct because it runs on another machine on the
network. How can I get it installed anyway?
 
S

Sherm Pendley

Huub said:
Ok, that works better. Question though: I tried to install DBD::mysql
as well. This failed because it didn't find a running MySQL server on
the machine..which is correct because it runs on another machine on
the network. How can I get it installed anyway?

By following the instructions that are included with DBD::mysql showing what
needs to be done to specify what server/database should be used for the tests.

Or if you're feeling lucky, you could follow the instructions in the docs
for CPAN.pm (i.e. perldoc CPAN.pm) that specify how to disregard the test
results and force the installation.

Docs are only helpful if you read them...

sherm--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top