Mysql – Bugzilla can’t install DBD::thesql

bugzillaMySQLperlredhat

Im not at all familiar with anything that I am doing right now… so I am extremely nervous about it.

I have some websites running on my server using mysql.

I use mysql -v
and I get:

mysql  Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (x86_64) using readline 5.1

I use ./checksetup --check-modules as bugzilla documentation specifies.

I get the response that a number of modules need to be installed.

I have installed all these modules.

However when I try to install DBD::mysql I get an error.

/usr/bin/make --NOT OK

I have placed all the output into a text file, but did not want to post it here as it is very long.

Does anyone know how I can overcome this issue?

I am using Redhat Linux… and Im a NooB ;(

EDIT:
To run the mysql update I use this command:

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

With regards to running CPAN, I am not sure, but these lines are appear in the output

Checking for                 CPAN (v1.81)     ok: found v1.98
Checking for                 YAML (any)       ok: found v0.81
Checking for   ExtUtils-MakeMaker (v6.31)     ok: found v6.62
CPAN: Storable loaded ok (v2.15)
Reading '/root/.cpan/Metadata'
  Database was generated on Tue, 10 Jul 2012 10:27:03 GMT
Installing DBD::mysql version 4.021...
Running install for module 'DBD::mysql'
Running make for C/CA/CAPTTOFU/DBD-mysql-4.021.tar.gz
CPAN: Digest::SHA loaded ok (v5.71)
CPAN: Compress::Zlib loaded ok (v1.42)

and then a little further:

CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.4401)
CPAN: CPAN::Meta loaded ok (v2.112150)
CPAN: Module::CoreList loaded ok (v2.68)

  CPAN.pm: Building C/CA/CAPTTOFU/DBD-mysql-4.021.tar.gz

and these are the last few lines of output with the error.

Writing Makefile for DBD::mysql
Writing MYMETA.yml and MYMETA.json
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
inux-thread-multi/CORE"   dbdimp.c
  CAPTTOFU/DBD-mysql-4.021.tar.gz
  /usr/bin/make -- NOT OK
Skipping test because of notest pragma
Running make install
  Make had returned bad status, install seems impossible

Best Answer

Generally speaking, it's a good idea to use the distribution's native package management tools whenever you can. Assuming you're using a distro that is based off RedHat Enterprise Linux 5 or 6 (such as CentOS or Scientific linux among others), you should be able to do:

yum install perl-DBD-MySQL

(It's possible that there are reasons why you're not doing it this way; if there are, please tell us.)

If that completes successfully, then it's likely that your Bugzilla dependency will be satisfied.

Updating:

The version of the perl MySQL driver that is available in your yum repository is too old for Bugzilla, so there are 2 possible approaches:

  • get a new repository such as http://iuscommunity.org/Repos. The trouble with this is that it will likely mean upgrades/conflicts with the other mysql packages such as your mysql-server package.
  • get the perl MySQL driver some other way (ie build it yourself)

This is the easiest approach I can think of for the 2nd option. (As root, you might not need the --sudo). You will need to have development tools such as a compiler, make, etc. AND the mysql development package (mysql-devel) installed.

curl -L http://cpanmin.us | perl - --sudo App::cpanminus
cpanm DBD::MySQL

If this is successful, bugzilla's dependency should be satisfied.