« spamassassin的中文垃圾邮件过滤规则集 | 首页 | CPAN相关软件的安装方法 »
July 12, 2005
安装SpamAssassin遇到问题的解决
编译安装SpamAssassin过程中:
报以下错误
[root@www Mail-SpamAssassin-3.0.4]# perl Makefile.PL
What email address or URL should be used in the suspected-spam report
text for users who want more information on your filter installation?
(In particular, ISPs should change this to a local Postmaster contact)
default text: [the administrator of that system]
Check network rules during 'make test' (test scripts may fail due to
network problems)? (y/n) [n] y
Warning: prerequisite Digest::SHA1 0 not found.
Writing Makefile for Mail::SpamAssassin
Makefile written by ExtUtils::MakeMaker 6.03
[root@www Mail-SpamAssassin-3.0.4]# make
/usr/bin/perl spamc/configure.pl --prefix="/usr" --sysconfdir="/etc/mail/spamassassin" --datadir="/usr/share/spamassassin" --enable-ssl="no"
cd spamc
/usr/bin/perl version.h.pl
version.h.pl: creating version.h
spamc/configure.pl: version.h.pl: Failed to get the version from Mail::SpamAssassin.
Please use the --with-version= switch to specify it manually.
The error was:
version.h.pl: version.h.pl: version.h.pl: version.h.pl: version.h.pl: version.h.pl: version.h.pl: Can't locate Digest/SHA1.pm in @INC (@INC contains: ../lib /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at ../lib/Mail/SpamAssassin/EvalTests.pm line 33.
BEGIN failed--compilation aborted at ../lib/Mail/SpamAssassin/EvalTests.pm line 33.
Compilation failed in require at ../lib/Mail/SpamAssassin/PerMsgStatus.pm line 56.
BEGIN failed--compilation aborted at ../lib/Mail/SpamAssassin/PerMsgStatus.pm line 56.
Compilation failed in require at ../lib/Mail/SpamAssassin.pm line 74.
BEGIN failed--compilation aborted at ../lib/Mail/SpamAssassin.pm line 74.
Compilation failed in require at version.h.pl line 27.
make: *** [spamc/Makefile] Error 2
解决办法:
根据perl时的错误提示是找不到Warning: prerequisite Digest::SHA1 0 not found.所以我们安装Digest::SHA1
安装后,重新编译,顺利编译SpamAssassin
由 frank 发表于 July 12, 2005 12:50 AM
相关文章
Digest::SHA1 0 not found 已经解决了,可我还有一条错Warning: prerequisite HTML::Parser 3.24 not found,可是我已经安装了
rpm -qa |grep perl
perl-5.8.0-88
perl-DateManip-5.40-30
perl-URI-1.21-7
perl-XML-Dumper-0.4-25
perl-Filter-1.29-3
perl-HTML-Tagset-3.03-28
perl-Parse-Yapp-1.05-30
perl-libwww-perl-5.65-6
perl-libxml-perl-0.07-28
perl-XML-Encoding-1.01-23
perl-XML-Grove-0.46alpha-25
perl-XML-Twig-3.09-3
perl-SGMLSpm-1.03ii-11
perl-HTML-Parser-3.26-17
perl-XML-Parser-2.31-15
perl-libxml-enno-1.02-29
perl-CPAN-1.61-88
perl-Time-HiRes-1.38-3
只是版本高些,不知道如何解决呀
由 bloodhawk 发表于 July 14, 2005 1:16 PM
参考我的这篇文章
http://blog.5ilinux.com/archives/2005/07/cpan.html
perl -MCPAN -e shell
cpan>install HTML::Parser
由 frank 发表于 July 14, 2005 3:04 PM
最近被垃圾邮件搞垮了。。。也准备安装个Spamassassin来试一下效果,结果发现我的服务器缺了N个模块,使用CPAN装了半天结果还是有几个安装失败,一直无法通过,也不知道如何解决好,希望楼主能给一些建议!感激!
目前还有以下几个模块无法安装通过
optional module missing: Razor2
optional module missing: Net::Ident
optional module missing: IO::Socket::INET6
optional module missing: IO::Socket::SSL
optional module missing: Time::HiRes
--------------------------------
1.在http://search.cpan.org上找到Razor2相关的文件Mail::SpamAssassin::Plugin::Razor2,尝试install,结果发现它却自动下载SpamAssassin 3.1.0进行安装,晕乎。。。
2.安装Net::Ident时候,提示如下,安装失败,似乎是无法找到Apache.pm导致的,未知如何设置才好
------------------------------------------
Do not worry if any of the following items are not found
Checking for previous Net::Ident... Not found.
You could force installing the backwards-compatible Net::Ident, for
example because you want to use scripts that rely on the backwards
compatible calling syntax [not that that's very likely; I'm not aware
of any existing scripts that use it -- JohnPC].
To enable this, re-run this Makefile.PL using:
perl Makefile.PL --force-compat
Checking for Apache.pm... not found
Writing Makefile for Net::Ident
cp Ident.pm blib/lib/Net/Ident.pm
Manifying blib/man3/Net::Ident.3pm
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/0use......ok
t/apache....skipped
all skipped: no reason given
t/compat....skipped
all skipped: no reason given
t/Ident.....FAILED tests 1-3
Failed 3/7 tests, 57.14% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/Ident.t 7 3 42.86% 1-3
2 tests skipped.
Failed 1/4 test scripts, 75.00% okay. 3/8 subtests failed, 62.50% okay.
make: *** [test_dynamic] Error 29
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
----------------------------------------------
3.安装IO::Socket::INET6,出现如下错误提示,无法安装通过
----------------------------------------------
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/io_multihomed6....IO::Socket::INET6: socket: Address family not supported by protocol at t/io_multihomed6.t line 57.
t/io_multihomed6....dubious
Test returned status 97 (wstat 24832, 0x6100)
DIED. FAILED tests 1-5
Failed 5/5 tests, 0.00% okay
t/io_sock6..........IO::Socket::INET6: socket: Address family not supported by protocol at t/io_sock6.t line 45.
t/io_sock6..........dubious
Test returned status 97 (wstat 24832, 0x6100)
DIED. FAILED tests 1-20
Failed 20/20 tests, 0.00% okay
t/io_udp6...........ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/io_multihomed6.t 97 24832 5 5 100.00% 1-5
t/io_sock6.t 97 24832 20 20 100.00% 1-20
Failed 2/3 test scripts, 33.33% okay. 25/32 subtests failed, 21.88% okay.
make: *** [test_dynamic] Error 29
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
-----------------------------------------------
4.安装IO::Socket::SSL,提示如下错误,搜索了和nonblock相关的文件,尝试安装了Net::Socket::NonBlock和IO::NonBlocking,结果还是无法通过
-----------------------------------------------
cpan> install IO::Socket::SSL
Running install for module IO::Socket::SSL
Running make for S/SU/SULLR/IO-Socket-SSL-0.994.tar.gz
Is already unwrapped into directory /root/.cpan/build/IO-Socket-SSL-0.994
Has already been processed within this session
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01loadmodule.....ok
t/02settings.......ok
t/cert_no_file.....ok
t/compatibility....ok
t/core.............ok
t/nonblock.........FAILED tests 10, 13, 26
Failed 3/27 tests, 88.89% okay
t/sessions.........ok
t/startssl.........ok
t/sysread_write....ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/nonblock.t 27 3 11.11% 10 13 26
Failed 1/9 test scripts, 88.89% okay. 3/156 subtests failed, 98.08% okay.
make: *** [test_dynamic] Error 29
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
-----------------------------------------------
5.安装Time::HiRes,出现如下错误,似乎也是某些文件无法找到。。。。
-----------------------------------------------
Configuring Time::HiRes...
Have syscall()... looking for syscall.h... found .
Looking for gettimeofday()... found.
Looking for setitimer()... found.
Looking for getitimer()... found.
You have interval timers (both setitimer and getitimer).
Looking for ualarm()... found.
Looking for usleep()... found.
Looking for nanosleep()... believing $Config{d_nanosleep}... found.
You can mix subsecond sleeps with signals, if you want to.
(It's still not portable, though.)
Looking for clock_gettime()... NOT found.
Looking for clock_getres()... NOT found.
Looking for clock_nanosleep()... NOT found.
Looking for clock()... found.
Checking if your kit is complete...
Looks good
Writing Makefile for Time::HiRes
Now you may issue 'make'. Do not forget also 'make test'.
NOTE: if you get an error like this (the Makefile line number may vary):
Makefile:91: *** missing separator
then set the environment variable LC_ALL to "C" and retry
from scratch (re-run perl "Makefile.PL").
Makefile:91: *** missing separator. Stop.
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
-----------------------------------------------
由 Copy 发表于 July 27, 2006 5:40 PM
安装SpamAssassin
perl -MCPAN -e shell
cpan>install Digest::SHA1
cpan>install HTML::Parser
cpan>install Net::DNS
cpan>install Mail::SPF::Query
cpan>install IP::Country
cpan>install Net::Ident
cpan>install IO::Socket::INET6
cpan>install IO::Socket::SSL
cpan>install DBI
cpan>install LWP::UserAgent
cpan>install Mail::SpamAssassin
我现在就安装这些,Razor2什么的,我都不装了
由 frank 发表于 July 27, 2006 6:26 PM
4.安装IO::Socket::SSL,提示如下错误,搜索了和nonblock相关的文件,尝试安装了Net::Socket::NonBlock和IO::NonBlocking,结果还是无法通过
针对这个问题,你可以先安装IO::Socket::INET 我也碰到过类似的问题,后来下载tar包,看了说明,才知道IO::Socket::SSL是要在IO::Socket::INET基础上编译的,你不妨试试。
由 frank 发表于 August 27, 2006 9:24 PM