MySQL Forums
Forum List  »  Perl

Re: DBD::mysql is installed but still error Can't locate DBD/mysql.pm in @INC
Posted by: Tony Darnell
Date: September 08, 2011 01:43PM

Is the DBD module in any of the directories in @INC?

To see all of the directories in @INC:

# /usr/bin/perl -V
....
@INC:
/Library/Perl/Updates/5.8.8/darwin-thread-multi-2level
/Library/Perl/Updates/5.8.8
/System/Library/Perl/5.8.8/darwin-thread-multi-2level
....

Here is how to find the directory for DBD (on a Unix box - login as root if possible):

# find / -name DBD -print
/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD
/Library/Perl/5.8.8/darwin-thread-multi-2level/Bundle/DBD
/Library/Perl/5.8.8/darwin-thread-multi-2level/DBD
/Library/Perl/5.8.8/darwin-thread-multi-2level/DBI/DBD
....


Do you have permissions to read the directory where DBD is installed?

If the directory where DBD is located is not in @INC, then you can specify the directory inside the Perl script:

use lib ("/dir1", "/dir2")

More information may be found here:
http://stackoverflow.com/questions/2526804/how-is-perls-inc-constructed-aka-what-are-all-the-ways-of-affecting-where-per

Options: ReplyQuote


Subject
Written By
Posted
Re: DBD::mysql is installed but still error Can't locate DBD/mysql.pm in @INC
September 08, 2011 01:43PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.