Perl – DBD-thesql installed ,but still error “install_driver(thesql) failed: Can’t locate DBD/thesql.pm in @INC”

perl

Install information:

Using DBI 1.608 (for perl 5.008009 on x86_64-linux) installed in /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux/auto/DBI/

error information:

[root@datacenterETL DBD-mysql-4.020]# perl ../testConnect.pl
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.9/x86_64-linux /usr/local/lib/perl5/5.8.9 /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.9 .) 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.

Best Answer

It looks like you're using Linux. In that case, you might find it easier to install a pre-packaged version of the module.

On a Red Hat derivative try yum install perl-DBD-mysql; on a Debian derivative try apt-get install libdbd-mysql-perl.

Related Topic