8

I am trying to install Bugzilla on my Centos server. but I got this error:

Checking for   DateTime-TimeZone (v0.71)    not found 

and

    COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands
    and then re-run this script):
    /usr/bin/perl install-module.pl DateTime::TimeZone

If I run: /usr/bin/perl install-module.pl DateTime::TimeZone

then I get this:

    CPAN: Storable loaded ok (v2.15)Reading '/root/.cpan/Metadata'
    Database was generated on Sun, 09 Oct 2011 17:27:24 GMT
    Installing DateTime::TimeZone version 1.39...
    CPAN: Module::CoreList loaded ok (v2.56)
    DateTime::TimeZone is up to date (1.39).

How can I fix this?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Xiabili
  • 486
  • 5
  • 20
  • 3
    IMHO, this is error in Bugzilla, in version comparison. Report it to Bugzilla's own bug tracker. – Alexandr Ciornii Oct 10 '11 at 00:07
  • 1
    I agree w/ Alexandr. Bugzilla is looking for version 0.71, but you have version 1.39 installed (which is quite a big leap in versioning). I was trying to figure out how this checking is done. It could be looking for a version equal to or greater, an exact match, or maybe something with a similar major version. I tried going through the logic, but didn't want to spend that long on tis issue. If you're not stuck on Bugzilla, you might want to try [MantisBT](http://www.mantisbt.org/). Mantis was specifically designed to replace Bugzilla with an easier to configure system. – David W. Oct 10 '11 at 01:42
  • 5
    Maybe the first message came from a `perl` other than `/usr/bin/perl`? Do you have more than one build of Perl installed? Try running `perl install-module.pl DateTime::TimeZone` (no leading `/usr/bin`). – ikegami Oct 10 '11 at 01:58

4 Answers4

9

I was having the same problem when upgrading. The DateTime::TimeZone module appeared to be installed but the Bugzilla checksetup.pl script always reported that it was not found. The following fixed the problem for me (run from the Bugzilla install dir):

$ perl install-module.pl Params::Util
$ perl install-module.pl Module::Runtime

I found this by writing a two line perl script to simulate the check done by Bugzilla:

use lib qw(. lib);
use DateTime::TimeZone;

and then running it to see the errors:

perl /tmp/foo.pl

After installing the above modules the foo.pl script passes and so does Bugzilla checksetup.pl.

mgk
  • 313
  • 3
  • 10
  • The second command, perl install-module.pl Module::Runtime, did it for me. This is for Bugzilla 4.2.3! It was NOT mentioned as optional / required anyhow, I think, but it bypasses the DateTime zone requirement even though I already had that module installed. – Shiroi98 Jan 04 '14 at 19:18
  • For me, the missing module had to do with YAML. Running the perl install-module.pl script was definitely the way to go (as opposed to running yum install or cpan directly). – Brad Lee Aug 05 '16 at 00:39
2

I have the same problem and the solution given in this link

Something like /usr/bin/perl install-module.pl Module::Build may be enough, although I would have thought that Module::Bundle is standard perl

mmazzei
  • 21
  • 1
1

I'd guess you have installed DateTime-TimeZone under your user account which is not accessible to the web server or the 'root' account. Try simply installing via your package manager:

yum install 'perl(DateTime::TimeZone)'
MichielB
  • 4,181
  • 1
  • 30
  • 39
0

I was experiencing this problem too. I'm not sure why it's not finding TimeZone.

I've dug briefly into the code and tried changing the version numbers of TimeZone to make it work, but it always says "not found".

Eventually, I just commented out the lines where it was trying to do the check. It then allowed me to install. (Add hashes to the beginning of each line)

#    {
#        package => 'DateTime-TimeZone',
#        module  => 'DateTime::TimeZone',
#        version => ON_WINDOWS ? '0.79' : '0.71'
#    },

This does seem like a bug in Bugzilla. I suggest reporting it.