CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Reg: I am getting this error message while executing perl script

 



Naju
New User

Mar 25, 2010, 5:49 PM

Post #1 of 2 (1610 views)
Reg: I am getting this error message while executing perl script Can't Post

Hi All,

I am getting the following error msg while executing the shell script. I downloaded "DBI-1.607.tar.gz" package and unzip that and the copied only DBI.pm (1.607 version) module which is compatible to my other existing perl modules and placed it in the following directory "/usr/lib/perl5/5.10.0" before executing the code. In my perl Script I included two things.

use DBI.pm;

use DBD::mysql;

I am trying to connect the database and trying to execute the select query to fetch the result set.

This is the error message:

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .) at (eval 3) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.
at dbase.pl line 11


Can you please tell me the solution for this problem or else do i need to download anyother software package and paste in to any specific directory to make this code work

Note: When I unzip the tar files there were several other scripts including .PL, .pm, .xs, .h, .pl . I havn't done anything with those packages.

Waiting in anticipation. Thanks in Advance

Regards

Naju


FishMonger
Veteran / Moderator

Mar 25, 2010, 7:48 PM

Post #2 of 2 (1602 views)
Re: [Naju] Reg: I am getting this error message while executing perl script [In reply to] Can't Post

You can't simply copy DBI.pm. You need to build/compile and install the module.

http://www.cpan.org/modules/INSTALL.html

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives