Dominic Harvey
Dominic Harvey

Reputation: 73

Error when installing usr/bin/perl install-module.pl DBD::mysql for Bugzilla

Bugzilla ./checksetup.pl report:

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

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

Here is the output of

$ /usr/bin/perl install-module.pl DBD::mysql

Checking for CPAN (v1.81) ok: found v2.11
Checking for YAML (any) ok: found v1.20
Checking for ExtUtils-MakeMaker (v6.31) ok: found v7.0401
Reading '/root/.cpan/Metadata'
Database was generated on Sat, 10 Dec 2016 15:17:02 GMT
Installing DBD::mysql version 4.041...
Running install for module 'DBD::mysql'
Checksum for /root/.cpan/source/authors/id/M/MI/MICHIELB/DBD-mysql-4.041.tar.gz ok
Configuring M/MI/MICHIELB/DBD-mysql-4.041.tar.gz with Makefile.PL
Can't exec "mysql_config": No such file or directory at Makefile.PL line 88.

Cannot find the file 'mysql_config'! Your execution PATH doesn't seem not contain the path to mysql_config. Resorting to guessed values!

PLEASE NOTE:

For 'make test' to run properly, you must ensure that the database user 'root' can connect to your MySQL server and has the proper privileges that these tests require such as 'drop table', 'create table', 'drop procedure', 'create procedure' as well as others.

mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

Can't exec "mysql_config": No such file or directory at Makefile.PL line 561. 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

to set this directory. For details see DBD::mysql::INSTALL, section "C Compiler flags" or type

perl Makefile.PL --help Warning: No success on command[/usr/bin/perl
Makefile.PL INSTALLDIRS=site LIB="/var/www/bugzilla/lib"
INSTALLMAN1DIR="/var/www/bugzilla/lib/man/man1"
INSTALLMAN3DIR="/var/www/bugzilla/lib/man/man3"
INSTALLBIN="/var/www/bugzilla/lib/bin"
INSTALLSCRIPT="/var/www/bugzilla/lib/bin" INSTALLDIRS=perl]
MICHIELB/DBD-mysql-4.041.tar.gz /usr/bin/perl Makefile.PL
INSTALLDIRS=site LIB="/var/www/bugzilla/lib"
INSTALLMAN1DIR="/var/www/bugzilla/lib/man/man1"
INSTALLMAN3DIR="/var/www/bugzilla/lib/man/man3"
INSTALLBIN="/var/www/bugzilla/lib/bin"
INSTALLSCRIPT="/var/www/bugzilla/lib/bin" INSTALLDIRS=perl -- NOT OK

When trying

$ /usr/bin/perl install-module.pl DBD::mysql --mysql_config /etc/mysql/mysql.conf.d

This error is reported

There is no Perl module on CPAN named /etc/mysql/mysql.conf.d/usr/bin/perl

Here are the details of the system I am working with

Linux

Ubuntu 16.04.1 LTS

Apache:

Server version: Apache/2.4.18 (Ubuntu)
Server built: 2016-07-14T12:32:26

MySQL:

Ver 14.14 Distrib 5.7.16, for Linux (x86_64) using EditLine wrapper

Perl:

perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi

Upvotes: 1

Views: 10398

Answers (3)

If in the end you don't get an automatic installation, try a manual installation. DBD::mysql manual installation

Upvotes: 0

Hema Rajgariya
Hema Rajgariya

Reputation: 29

I was having the same issue while trying to install bugzilla,

Assumed that you have bugzilla in directory var/www/html

What i did was

Just go to the directory : var/www/html/bugzilla and execute command:

perl install-module.pl --all

Upvotes: 0

Dominic Harvey
Dominic Harvey

Reputation: 73

After reading @Borodin's comment, I issued:

$ sudo apt-get install libdbd-mysql-perl

and the $ ./checksetup.pl --check-modules no longer report any errors.

(Many thanks @Borodin for the hint :-)

Upvotes: 2

Related Questions