Can't install Perl DBD module on Ubuntu (for Bugzilla)

Mara asked:

Trying to install bugzilla-4.2.2 on Ubuntu 12.04. When I run checksetup.pl I get the following error:

YOU MUST RUN ONE OF THE FOLLOWING COMMANDS (depending on which database
you use):

PostgreSQL: /usr/bin/perl install-module.pl DBD::Pg
MySQL: /usr/bin/perl install-module.pl DBD::mysql
SQLite: /usr/bin/perl install-module.pl DBD::SQLite
Oracle: /usr/bin/perl install-module.pl DBD::Oracle

To attempt an automatic install of every required and optional module
with one command, do:

/usr/bin/perl install-module.pl --all

I have installed MySQL via XAMPP so I run:

/urs/bin/perl install-module.pl DBD::mysql

And get the following error:

perl Makefile.PL --testuser=username

Can't exec "mysql_config": No such file or directory at Makefile.PL line 479.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 479.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 479.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Failed to determine directory of mysql.h. Use

perl Makefile.PL --cflags=-I<dir>

to set this directory. For details see the INSTALL.html file,
section "C Compiler flags" or type

perl Makefile.PL --help
Warning: No success on command[/usr/bin/perl Makefile.PL  LIB="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib" INSTALLMAN1DIR="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/man/man1" INSTALLMAN3DIR="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/man/man3" INSTALLBIN="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/bin" INSTALLSCRIPT="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/bin" INSTALLDIRS=perl]
CAPTTOFU/DBD-mysql-4.021.tar.gz
/usr/bin/perl Makefile.PL  LIB="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib" INSTALLMAN1DIR="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/man/man1" INSTALLMAN3DIR="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/man/man3" INSTALLBIN="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/bin" INSTALLSCRIPT="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/bin" INSTALLDIRS=perl -- NOT OK
Skipping test because of notest pragma
Running make install
Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites

So then I tried checksetup.pl‘s suggestion and ran:

/usr/bin/perl install-module.pl --all

And it seems to have installed DBD::SQLite without any problems, but again I see a warning that says it’s skipping tests because of notest pragma.

When I re-run checksetup.pl It shows 3 of the 4 original DB drivers in the “not found” list:

PostgreSQL: /usr/bin/perl install-module.pl DBD::Pg
MySQL: /usr/bin/perl install-module.pl DBD::mysql
Oracle: /usr/bin/perl install-module.pl DBD::Oracle

So running it with --all seems to have installed the SQLite driver without any problems, but for some reason I can’t seem to install the MySQL driver. Again I need MySQL because thats what XAMPP uses and because I prefer MySQL regardless. I have a feeling it has something to do with this notest pragma error. Any ideas? Thanks in advance!

My answer:


Why not just install Bugzilla 4 from a PPA and save yourself a whole lot of trouble?


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.