ClamAV Perl Modul Mail::ClamAV

Apache, Lighttpd, nginx, Cherokee
tuxie
Posts: 9
Joined: 2007-11-01 12:14

ClamAV Perl Modul Mail::ClamAV

Post by tuxie » 2007-11-01 13:03

Hallo,

ich habe bei der Einrichtung des Perl Moduls Mail::ClamAV ein Problem,

Code: Select all

cpan> test Mail::ClamAV
Running test for module Mail::ClamAV
Running make for S/SA/SABECK/Mail-ClamAV-0.20.tar.gz
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok
Checksum for /root/.cpan/sources/authors/id/S/SA/SABECK/Mail-ClamAV-0.20.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Mail-ClamAV-0.20/
Mail-ClamAV-0.20/t/
Mail-ClamAV-0.20/t/eicarcom2.zip
Mail-ClamAV-0.20/t/Mail-ClamAV.t
Mail-ClamAV-0.20/t/virus.eml
Mail-ClamAV-0.20/Inline/
Mail-ClamAV-0.20/Inline/MakeMaker.pm
Mail-ClamAV-0.20/META.yml
Mail-ClamAV-0.20/config.pl
Mail-ClamAV-0.20/Changes
Mail-ClamAV-0.20/MANIFEST
Mail-ClamAV-0.20/ClamAV.pm
Mail-ClamAV-0.20/INSTALL
Mail-ClamAV-0.20/Makefile.PL
Mail-ClamAV-0.20/README
Removing previously used /root/.cpan/build/Mail-ClamAV-0.20

  CPAN.pm: Going to build S/SA/SABECK/Mail-ClamAV-0.20.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Mail::ClamAV
cp ClamAV.pm blib/lib/Mail/ClamAV.pm
/usr/bin/perl -Mblib -MInline=NOISY,_INSTALL_ -MMail::ClamAV -e1 0.20 blib/arch
Starting Build Prepocess Stage
Finished Build Prepocess Stage

Starting Build Parse Stage
Finished Build Parse Stage

Starting Build Glue 1 Stage
Finished Build Glue 1 Stage

Starting Build Glue 2 Stage
Finished Build Glue 2 Stage

Starting Build Glue 3 Stage
Finished Build Glue 3 Stage

Starting Build Compile Stage
  Starting "perl Makefile.PL" Stage
Writing Makefile for Mail::ClamAV
  Finished "perl Makefile.PL" Stage

  Starting "make" Stage
make[1]: Entering directory `/root/.cpan/build/Mail-ClamAV-0.20/_Inline/build/Mail/ClamAV'
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap   ClamAV.xs > ClamAV.xsc && mv ClamAV.xsc ClamAV.c
cc -c  -I/root/.cpan/build/Mail-ClamAV-0.20 -I/usr/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -pipe   -DVERSION="0.20" -DXS_VERSION="0.20" -fPIC "-I/usr/lib/perl5/5.8.8/i586-linux-thread-multi/CORE"   ClamAV.c
ClamAV.xs: In function ‘clamav_perl_new’:
ClamAV.xs:53: warning: implicit declaration of function ‘cl_loaddbdir’
ClamAV.xs:56: warning: implicit declaration of function ‘cl_loaddb’
ClamAV.xs: In function ‘clamav_perl__scanfd’:
ClamAV.xs:202: warning: unused variable ‘items’
ClamAV.xs:197: warning: unused variable ‘len’
ClamAV.xs: In function ‘clamav_perl__scanfile’:
ClamAV.xs:239: warning: unused variable ‘items’
ClamAV.xs:233: warning: unused variable ‘len’
Running Mkbootstrap for Mail::ClamAV ()
chmod 644 ClamAV.bs
rm -f blib/arch/auto/Mail/ClamAV/ClamAV.so
LD_RUN_PATH="/usr/lib" cc  -shared ClamAV.o  -o blib/arch/auto/Mail/ClamAV/ClamAV.so   
   -L/usr/lib -lz -lbz2 -lgmp -lclamav         
 
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../../i586-suse-linux/bin/ld: cannot find -lgmp
collect2: ld returned 1 exit status
make[1]: *** [blib/arch/auto/Mail/ClamAV/ClamAV.so] Fehler 1
make[1]: Leaving directory `/root/.cpan/build/Mail-ClamAV-0.20/_Inline/build/Mail/ClamAV'

A problem was encountered while attempting to compile and install your Inline
C code. The command that failed was:
  make

The build directory was:
/root/.cpan/build/Mail-ClamAV-0.20/_Inline/build/Mail/ClamAV

To debug the problem, cd to the build directory, and inspect the output files.

 at /root/.cpan/build/Mail-ClamAV-0.20/blib/lib/Mail/ClamAV.pm line 178
BEGIN failed--compilation aborted at /root/.cpan/build/Mail-ClamAV-0.20/blib/lib/Mail/ClamAV.pm line 542.
Compilation failed in require.
BEGIN failed--compilation aborted.
make: *** [ClamAV.inl] Fehler 25
  /usr/bin/make  -- NOT OK
Running make test
  Can't test without successful make

cpan>


Dann habe ich eine clamav.pm gefunden und einfach in das entsprechende Verzeichnis rein kopiert.

Nun bekomme ich von Spamassassin folgende meldung.

Code: Select all

plugin: failed to create instance of plugin ClamAV: Can't locate object method "new" via package "ClamAV" (perhaps you forgot to load "ClamAV"?) at (eval 196) line 1.


Habe ich was falsch gemacht oder hat jemand einen Tip wie ich das abstellen kann.


TSchau Ingo

tuxie
Posts: 9
Joined: 2007-11-01 12:14

Re: ClamAV Perl Modul Mail::ClamAV

Post by tuxie » 2007-11-01 13:15

Habe es gerate selbst gefunden, es mußte noch die lib gbm-devel installiert werden. Und schon Funktioniert es.

TSchau Ingo

tuxie
Posts: 9
Joined: 2007-11-01 12:14

Re: ClamAV Perl Modul Mail::ClamAV

Post by tuxie » 2007-11-01 14:59

Zu früh gefreut!! :(

/etc/mail/spamassassin # sa-learn --sync
plugin: failed to load plugin /etc/mail/spamassassin/clamav.pm: Datei oder Verzeichnis nicht gefunden
plugin: failed to create instance of plugin ClamAV: Can't locate object method "new" via package "ClamAV" (perhaps you forgot to load "ClamAV"?) at (eval 196) line 1.


die Datei clamav.pm existiert aber in diesem Verzeichnis

[/i]