Results 1 to 4 of 4

Thread: perl DBI

  1. #1

    Thread Starter
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236

    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?

  2. #2
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    Are you using activeperl? if so try search the folders for DBI.pm to see if its actually there
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  3. #3

    Thread Starter
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236
    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?

  4. #4
    Addicted Member
    Join Date
    Nov 2001
    Location
    Yewston, Texis
    Posts
    240
    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
  •  



Click Here to Expand Forum to Full Width