I know this is an old thread, but this problem continues to occur with amavisd/Compress-Zlib.
I have found that updating Scalar-List-Utils from cpan to be a fast and easy fix for this problem. As I have just fixed this problem once again on my mail server and the fact that this LQ forum comes up in the top two hits for this problem when I search, I figured I would post an updated transcript on how to fix this quickly.
The Problem:
------------
[root@localhost ~]# service amavisd start
Starting Mail Virus Scanner (amavisd): fetch_modules: error loading required module Compress/Zlib.pm:
dualvar is only available with the XS version of Scalar::Util at /usr/lib/perl5/vendor_perl/5.8.8/Compress/Zlib.pm line 8
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Compress/Zlib.pm line 8.
Compilation failed in require at /usr/sbin/amavisd line 197.
ERROR: MISSING REQUIRED BASIC MODULES:
Compress::Zlib
BEGIN failed--compilation aborted at /usr/sbin/amavisd line 237.
[FAILED]
[root@localhost ~]# rpm -qa | grep Compress
perl-IO-Compress-2.037-1.el5.rfx
perl-Compress-Raw-Zlib-2.037-1.el5.rf
perl-Compress-Raw-Bzip2-2.037-1.el5.rf
The Solution:
-------------
[root@localhost ~]# wget
http://search.cpan.org/CPAN/authors/...1.23_03.tar.gz
--2012-01-15 10:06:00--
http://search.cpan.org/CPAN/authors/...1.23_03.tar.gz
Resolving search.cpan.org... ll199.15.176.161
Connecting to search.cpan.org|199.15.176.161|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location:
http://httpupdate14.cpanel.net/CPAN/...1.23_03.tar.gz [following]
--2012-01-15 10:06:05--
http://httpupdate14.cpanel.net/CPAN/...1.23_03.tar.gz
Resolving httpupdate14.cpanel.net...74.200.65.162
Connecting to httpupdate14.cpanel.net|74.200.65.162|:80...connected.
HTTP request sent, awaiting response... 200 OK
Length: 69070 (67K) [application/x-gzip]
Saving to: `Scalar-List-Utils-1.23_03.tar.gz'
100%[==================================================================================================== ===========================================================>] 69,070 137K/s in 0.5s
2012-01-15 10:06:06 (137 KB/s) - `Scalar-List-Utils-1.23_03.tar.gz' saved [69070/69070]
[root@localhost ~]# cd src
[root@localhost src]# tar zxvf ../Scalar-List-Utils-1.23_03.tar.gz
Scalar-List-Utils-1.23_03/
Scalar-List-Utils-1.23_03/Changes
Scalar-List-Utils-1.23_03/lib/
Scalar-List-Utils-1.23_03/ListUtil.xs
Scalar-List-Utils-1.23_03/Makefile.PL
Scalar-List-Utils-1.23_03/MANIFEST
Scalar-List-Utils-1.23_03/META.yml
Scalar-List-Utils-1.23_03/multicall.h
Scalar-List-Utils-1.23_03/ppport.h
Scalar-List-Utils-1.23_03/README
Scalar-List-Utils-1.23_03/SIGNATURE
Scalar-List-Utils-1.23_03/t/
Scalar-List-Utils-1.23_03/t/00version.t
Scalar-List-Utils-1.23_03/t/blessed.t
Scalar-List-Utils-1.23_03/t/dualvar.t
Scalar-List-Utils-1.23_03/t/first.t
Scalar-List-Utils-1.23_03/t/getmagic-once.t
Scalar-List-Utils-1.23_03/t/isvstring.t
Scalar-List-Utils-1.23_03/t/lln.t
Scalar-List-Utils-1.23_03/t/max.t
Scalar-List-Utils-1.23_03/t/maxstr.t
Scalar-List-Utils-1.23_03/t/min.t
Scalar-List-Utils-1.23_03/t/minstr.t
Scalar-List-Utils-1.23_03/t/openhan.t
Scalar-List-Utils-1.23_03/t/proto.t
Scalar-List-Utils-1.23_03/t/readonly.t
Scalar-List-Utils-1.23_03/t/reduce.t
Scalar-List-Utils-1.23_03/t/refaddr.t
Scalar-List-Utils-1.23_03/t/reftype.t
Scalar-List-Utils-1.23_03/t/shuffle.t
Scalar-List-Utils-1.23_03/t/stack-corruption.t
Scalar-List-Utils-1.23_03/t/sum.t
Scalar-List-Utils-1.23_03/t/tainted.t
Scalar-List-Utils-1.23_03/t/weak.t
Scalar-List-Utils-1.23_03/lib/List/
Scalar-List-Utils-1.23_03/lib/Scalar/
Scalar-List-Utils-1.23_03/lib/Scalar/Util.pm
Scalar-List-Utils-1.23_03/lib/List/Util/
Scalar-List-Utils-1.23_03/lib/List/Util.pm
Scalar-List-Utils-1.23_03/lib/List/Util/XS.pm
[root@localhost src]# cd Scalar-List-Utils-1.23_03/
[root@localhost Scalar-List-Utils-1.23_03]# perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for List::Util
[root@localhost Scalar-List-Utils-1.23_03]# make test install
cp lib/List/Util/XS.pm blib/lib/List/Util/XS.pm
cp lib/List/Util.pm blib/lib/List/Util.pm
cp lib/Scalar/Util.pm blib/lib/Scalar/Util.pm
/usr/bin/perl /usr/lib/perl5/site_perl/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap ListUtil.xs > ListUtil.xsc && mv ListUtil.xsc ListUtil.c
gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"1.23_03\" -DXS_VERSION=\"1.23_03\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" -DPERL_EXT ListUtil.c
ListUtil.c: In function ‘XS_List__Util_min’:
ListUtil.xs:71: warning: ‘retval’ may be used uninitialized in this function
Running Mkbootstrap for List::Util ()
chmod 644 Util.bs
rm -f blib/arch/auto/List/Util/Util.so
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic ListUtil.o -o blib/arch/auto/List/Util/Util.so \
\
chmod 755 blib/arch/auto/List/Util/Util.so
cp Util.bs blib/arch/auto/List/Util/Util.bs
chmod 644 blib/arch/auto/List/Util/Util.bs
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00version...........ok
t/blessed.............ok
t/dualvar.............ok
t/first...............ok
2/24 skipped: Poor man's MULTICALL can't cope
t/getmagic-once.......ok
t/isvstring...........ok
t/lln.................ok
t/max.................ok
t/maxstr..............ok
t/min.................ok
t/minstr..............ok
t/openhan.............ok
t/proto...............ok
t/readonly............ok
t/reduce..............ok
2/31 skipped: Poor man's MULTICALL can't cope
t/refaddr.............ok
t/reftype.............ok
t/shuffle.............ok
t/stack-corruption....ok
t/sum.................ok
t/tainted.............ok
t/weak................ok
All tests successful, 4 subtests skipped.
Files=22, Tests=295, 0 wallclock secs ( 0.38 cusr + 0.16 csys = 0.54 CPU)
Manifying blib/man3/List::Util::XS.3pm
Manifying blib/man3/List::Util.3pm
Manifying blib/man3/Scalar::Util.3pm
Installing /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/auto/List/Util/Util.so
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/List/Util.pm
Installing /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/List/Util/XS.pm
Installing /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Scalar/Util.pm
Installing /usr/share/man/man3/List::Util.3pm
Installing /usr/share/man/man3/Scalar::Util.3pm
Installing /usr/share/man/man3/List::Util::XS.3pm
Writing /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/auto/List/Util/.packlist
Appending installation info to /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod
[root@localhost Scalar-List-Utils-1.23_03]# service amavisd start
Starting Mail Virus Scanner (amavisd): [ OK ]