|
-
Mar 14th, 2002, 07:54 AM
#1
Thread Starter
Addicted Member
perl DBI
I'm trying to use connect to a mysql database and I read somewhere to use the DBI class. So, my program looks like this
#!/usr/bin/perl
#
use DBI;
but it dies right there on line 3 with this error..
Can't locate DBI.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /u
sr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/si
te_perl/5.005 .) at ./testrun.pl line 3.
BEGIN failed--compilation aborted at ./testrun.pl line 3.
So I'm stumped, I'm new to perl. Can anybody tell what I need to do?
-
Mar 14th, 2002, 09:59 AM
#2
Fanatic Member
Are you using activeperl? if so try search the folders for DBI.pm to see if its actually there
-
Mar 14th, 2002, 11:05 AM
#3
Thread Starter
Addicted Member
alright I got past that. I downloaded the DBI API and got it working. But when I try to download the mysql file for perl, it has a makefile but when I type Make it says no makefile found.
http://www.mysql.com/downloads/downl...-1.2216.tar.gz
thats where I got it but maybe I'm not DLing the right one or something. any ideas?
-
Mar 14th, 2002, 01:12 PM
#4
Addicted Member
One of the most frustrating things you can do is to try to install Perl modules in a windows environment. Activestate has a nifty online installation tool called ppm.
Assuming you are in a win32 environment and have Activestate perl, simply type:
ppm install DBD-Mysql
(make sure you are online) and the Mysql interface for DBI will be installed.
cudabean
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|