Click to See Complete Forum and Search --> : Zlib issue


Sam Granger
04-08-2009, 03:47 AM
Hey guys!

I've got a perl problem, getting the following error:

Attempt to reload Compress/Zlib.pm aborted.

The Zlib file is in the correct location, Perl/lib/Compress/Zlib.pm and I ran the makefile.PL so it should be installed. :(

Does anyone know what could be causing this problem?

Ps. I'm using ActivePerl

Sixtease
04-09-2009, 12:10 AM
And what gives you that error?

Sam Granger
04-09-2009, 04:02 AM
And what gives you that error?

I get the error at the include line.

# use 5.008008;
use strict;
use warnings;
no warnings qw(uninitialized);
use WWW::Mechanize;
use Compress::Zlib; <---- this line

Sixtease
04-09-2009, 04:05 AM
Do you have console access? Can you try running this command?
perl -MCompress::Zlib -e 1
If you can, does it say anything to you?

Sam Granger
04-16-2009, 07:11 PM
Do you have console access? Can you try running this command?
perl -MCompress::Zlib -e 1
If you can, does it say anything to you?

Hey there! Thanks for all your great help so far! :)

This is the output I got from the command you gave me:

Compress::Raw::Zlib object version 2.012 does not match bootstrap parameter 2.01
5 at G:/Perl/lib/Compress/Raw/Zlib.pm line 97.
Compilation failed in require at G:/Perl/lib/Compress/Zlib.pm line 12.
BEGIN failed--compilation aborted at G:/Perl/lib/Compress/Zlib.pm line 12.
Compilation failed in require.
BEGIN failed--compilation aborted.

Sixtease
04-17-2009, 01:07 AM
Oh I saw this before. It's been a difficult one to overcome. If I remember correctly, it had something to do with version collisions. So, I think there are two possibilities:

1) The module was compiled for another computer and copied to this one. If that's the case, I guess the only thing you can do is remove the package with all its related files (like the XS compiled libs) and reinstall it.

2) There was an older version of the module when the new one was being installed and the versions collide. The solution here would be very similar, but you'd have to be doubly careful to remove everything related to Zlib from the perl include path prior to reinstalling the module. All versions.

Unfortunately, I'm not sure how exactly you should find out what files belong to the module. I'd say that this shell command could give you a good start:
find `perl -le 'print "@INC"'` | grep Zlib

But I guess in your case a prudent decision would be to ask people over at perlmonks.org (http://perlmonks.org/).