Mail::ClamAV [was: Re: SAVI-Perl/Sophos on RedHat Enterprise 4]

David Lee t.d.lee at DURHAM.AC.UK
Mon Mar 7 12:59:38 GMT 2005

On Mon, 7 Mar 2005, Pete Russell wrote:

> Mine still fails at make on RHEL4
> Checking if your kit is complete...
> Looks good
> Writing Makefile for Mail::ClamAV
> /usr/bin/perl -Mblib -MInline=NOISY,_INSTALL_ -MMail::ClamAV -e1 0.16
> blib/arch
> Can't open blib/lib/Mail/ No such file or directory.
> Can't locate Mail/ in @INC (@INC contains:
> /root/.cpan/build/Mail-ClamAV-0.16/blib/arch
> /root/.cpan/build/Mail-ClamAV-0.16/blib/lib
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi
> [...]

Whereas the earlier parts of this thread were about Mail::ClamAV failing
the "make test" stage (i.e. relatively late), this problem is way before
it gets that far.

Some of what follows might be obvious, but I'm including it "just in

The Mail::ClamAV module is simply a thin wrapper onto your existing
"clamav" software.  The build procedure for this module probably cannot
find your installation of it.

Quick test:  Do something like "clamav-config --cflags" which, on a
working system, would echo back the "CFLAGS" necessary for things that
want to interface with the clamav software.  It's my guess that on your
system you'll get "Command not found" or similar.

Find out where the clamav software is located on your particular system.

Set the PATH to include that location's bin directory.

Verify that "clamav-config --cflags" now does work, returning typical
CFLAGS-like things.

Now, with that PATH set up, re-try the build.  This should work (although
may later fail at the "make test" stage) as discussed previously on this

To see the gory details, cd to its build directory (if from CPAN, probably
something like ".cpan/build/Mail-ClamAV-0.16").  Do "make clean", to get a
clean start, then "perl Makefile.PL" then "make".  Et cetera.

(If you peek inside "Makefile.PL", you'll see stuff relating to the
"clamav-config --cflags" discussed above.)


:  David Lee                                I.T. Service          :
:  Senior Systems Programmer                Computer Centre       :
:                                           University of Durham  :
:            South Road            :
:                                           Durham                :
:  Phone: +44 191 334 2752                  U.K.                  :

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ ( and
the archives (

Support MailScanner development - buy the book off the website!

More information about the MailScanner mailing list