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: DBI:
DBD::mysql is installed but still error Can't locate DBD/mysql.pm in @INC

 



newbielgn
New User

Aug 18, 2011, 3:55 AM

Post #1 of 3 (9884 views)
DBD::mysql is installed but still error Can't locate DBD/mysql.pm in @INC Can't Post

Hi,

DBD::mysql is installed successfully please see (1) below.
But still i get error as given in (2) below:
Please help to resolve this error

~Thanks

(1) Successful installation message
[user@mysystem]$ perl -MCPAN -e 'install DBD::mysql'
CPAN: Storable loaded ok (v2.19)
Going to read /root/.cpan/Metadata
Database was generated on Wed, 17 Aug 2011 04:32:32 GMT
DBD::mysql is up to date (4.019).

(2) Error message:
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . ) at (eval 15) 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.


FishMonger
Veteran / Moderator

Aug 18, 2011, 6:10 AM

Post #2 of 3 (9874 views)
Re: [newbielgn] DBD::mysql is installed but still error Can't locate DBD/mysql.pm in @INC [In reply to] Can't Post

It appears to me that you may have both a 64bit and a 32bit version of perl installed. In which version was the module installed and is that the same version that your script is using?

What is the actual path to the module and is that path in the @INC array?


newbielgn
New User

Aug 18, 2011, 6:23 AM

Post #3 of 3 (9872 views)
Re: [FishMonger] DBD::mysql is installed but still error Can't locate DBD/mysql.pm in @INC [In reply to] Can't Post

Script was using /usr/bin/perl but I had installed mysql.pm for perl in /usr/local/bin/perl
when i used /usr/local/bin/perl in my script it worked.

Thank you very much

 
 


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

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