SpamAssasin build failed / halted

xerox

Verified User
Joined
Jul 16, 2019
Messages
151
Hi there i am unable to build spamassassin. I am using custombuild 2 and newest DirectAdmin.

I followed few articles: https://help.directadmin.com/item.php?id=36
also this one:

Code:
[root@server custombuild]# cd /usr/local/directadmin/scripts
[root@server scripts]# ./spam.sh
Downloading             Mail-SpamAssassin-3.4.2.tar.gz...
--2019-07-18 08:59:06--  http://files.directadmin.com/services/custombuild/Mail-SpamAssassin-3.4.2.tar.gz
Resolving files.directadmin.com (files.directadmin.com)... 
Connecting to files.directadmin.com (files.directadmin.com)|... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3194225 (3.0M) [application/x-gzip]
Saving to: '/usr/local/directadmin/scripts/packages/Mail-SpamAssassin-3.4.2.tar.gz'

100%[============================================================================================================>] 3,194,225   2.17MB/s   in 1.4s

2019-07-18 08:59:08 (2.17 MB/s) - '/usr/local/directadmin/scripts/packages/Mail-SpamAssassin-3.4.2.tar.gz' saved [3194225/3194225]

NOTE: settings for "make test" are now controlled using "t/config.dist".
See that file if you wish to customize what tests are run, and how.

checking module dependencies and their versions...

***************************************************************************
ERROR: the required HTML::Parser module is installed (3.35),
but is below the minimum required version 3.43,
some functionality will not be available.

  HTML is used for an ever-increasing amount of email so this dependency
  is unavoidable.  Run "perldoc -q html" for additional information.


***************************************************************************
NOTE: the optional Digest::SHA1 module is not installed.

  The Digest::SHA1 module is still required by the Razor2 plugin.
  Other modules prefer Digest::SHA, which is a Perl base module.


***************************************************************************
NOTE: the optional Geo::IP module is not installed.

  Used by the RelayCountry plugin (not enabled by default) to determine
  the domain country codes of each relay in the path of an email.  Also used by
  the URILocalBL plugin to provide ISP and Country code based filtering.


***************************************************************************
NOTE: the optional Net::CIDR::Lite module is not installed.

  Used by the URILocalBL plugin to process IP address ranges.


***************************************************************************
NOTE: the optional Net::Patricia module is not installed,
minimum required version is 1.16.

  If this module is available, it will be used for IP address lookups
  in tables internal_networks, trusted_networks, and msa_networks. Recommended
  when a number of entries in these tables is large, i.e. in hundreds
  or thousands. However, in case of overlapping (or conflicting) networks
  in these tables, lookup results may differ as Net::Patricia finds a
  tightest-matching entry, while a sequential NetAddr::IP search finds
  a first-matching entry. So when overlapping network ranges are given,
  specifying more specific subnets (longest netmask) first, followed by
  wider subnets ensures predictable results.


***************************************************************************
NOTE: the optional Net::DNS::Nameserver module is not installed.

  Net::DNS:Nameserver is typically part of Net::DNS.  However, RHEL/
  CentOS systems may install it using separate packages.  Because of this, we
  check for both Net::DNS and Net::DNS::Nameserver.  However,
  Net::DNS::Nameserver is only used in make test as of June 2014.


***************************************************************************
NOTE: the optional BSD::Resource module is not installed.

  BSD::Resource provides BSD process resource limit and priority
  functions.  It is used by the optional ResourceLimits Plugin.

checking binary dependencies and their versions...

***************************************************************************
NOTE: the optional fetch binary is not installed.

   Sa-update will use curl, wget or fetch to download updates.
   Because perl module LWP does not support IPv6, sa-update as of
   3.4.0 will use these standard programs to download rule updates
   leaving LWP as a fallback if none of the programs are found.

   *IMPORTANT NOTE*: You only need one of these programs
       It's only a concern if you are warned about all 3
       i.e. (curl, wget & fetch) missing


***************************************************************************
NOTE: the optional re2c binary is not installed.

  The "re2c" program is used by sa-compile to compile rules
  for regular expressions to speed up scanning.

dependency check complete...

REQUIRED module out of date: HTML::Parser
optional module missing: Digest::SHA1
optional module missing: Geo::IP
optional module missing: Net::CIDR::Lite
optional module missing: Net::Patricia
optional module missing: Net::DNS::Nameserver
optional module missing: BSD::Resource
optional binary missing or nonfunctional: fetch
optional binary missing or nonfunctional: re2c

warning: some functionality may not be available,
please read the above report before continuing!

make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
Cannot find /usr/bin/sa-update after install. Check for errors above.


Cannot find /usr/bin/spamd.  Check above for errors or missing perl modules.
If needed, use cpan to install the missing modules, eg:
  cpan -i Archive::Tar Digest::SHA Mail::SPF IP::Country Net::Ident IO::Socket::INET6 Compress::Zlib Mail::DKIM LWP::UserAgent HTTP::Date Encode::Detect ExtUtils::MakeMaker NetAddr::IP Mail::SpamAssassin::Plugin::Razor2 Razor2::Client::Agent IO::Socket::SSL DBI

Press enter to answer [yes] if it asks you to install dependencies (it will prepend them to the queue)
Answer no if it asks: Are you ready for manual configuration? [yes] no

After i try to install those modules with cpan i get the same result:

Code:
[root@server scripts]# cpan -i Archive::Tar Digest::SHA Net::DNS Net::DNS::Resolver::Programmable Mail::SPF Geo::IP Net::CIDR::Lite IO::Socket::IP \
> IP::Country Net::Ident Net::Patricia IO::Socket::INET6 Compress::Zlib Mail::DKIM LWP::UserAgent HTTP::Date Encode::Detect ExtUtils::MakeMaker \
> NetAddr::IP Mail::SpamAssassin::Plugin::Razor2 Razor2::Client::Agent IO::Socket::SSL DBI Sys::Syslog DBD::File
CPAN: Storable loaded ok (v2.45)
Going to read /root/.cpan/Metadata
Warning: Found only 0 objects in /root/.cpan/Metadata
CPAN: LWP::UserAgent loaded ok (v6.05)
CPAN: Time::HiRes loaded ok (v1.9725)
Your urllist is empty! The urllist can be edited. E.g. with 'o conf urllist
push ftp://myurl/'

Could not fetch authors/01mailrc.txt.gz
Your urllist is empty! The urllist can be edited. E.g. with 'o conf urllist
push ftp://myurl/'

Could not fetch modules/0****kages.details.txt.gz
Your urllist is empty! The urllist can be edited. E.g. with 'o conf urllist
push ftp://myurl/'

Could not fetch modules/03modlist.data.gz
Going to write /root/.cpan/Metadata
Warning: Cannot install Archive::Tar, don't know what it is.
Try the command

    i /Archive::Tar/

to find objects with matching identifiers.
Warning: Cannot install Digest::SHA, don't know what it is.
Try the command

    i /Digest::SHA/

to find objects with matching identifiers.
Warning: Cannot install Net::DNS, don't know what it is.
Try the command

    i /Net::DNS/

to find objects with matching identifiers.
Warning: Cannot install Net::DNS::Resolver::Programmable, don't know what it is.
Try the command

    i /Net::DNS::Resolver::Programmable/

to find objects with matching identifiers.
Warning: Cannot install Mail::SPF, don't know what it is.
Try the command

    i /Mail::SPF/

to find objects with matching identifiers.
Warning: Cannot install Geo::IP, don't know what it is.
Try the command

    i /Geo::IP/

to find objects with matching identifiers.
Warning: Cannot install Net::CIDR::Lite, don't know what it is.
Try the command

    i /Net::CIDR::Lite/

to find objects with matching identifiers.
Warning: Cannot install IO::Socket::IP, don't know what it is.
Try the command

    i /IO::Socket::IP/

to find objects with matching identifiers.
^Z
[6]+  Stopped                 cpan -i Archive::Tar Digest::SHA Net::DNS Net::DNS::Resolver::Programmable Mail::SPF Geo::IP Net::CIDR::Lite IO::Socket::IP IP::Country Net::Ident Net::Patricia IO::Socket::INET6 Compress::Zlib Mail::DKIM LWP::UserAgent HTTP::Date Encode::Detect ExtUtils::MakeMaker NetAddr::IP Mail::SpamAssassin::Plugin::Razor2 Razor2::Client::Agent IO::Socket::SSL DBI Sys::Syslog DBD::File
 
Have you installed the perl/cpan requierements as suggested in the support article?

Code:
yum -y install perl-ExtUtils-MakeMaker perl-Digest-SHA perl-Net-DNS perl-NetAddr-IP perl-Archive-Tar perl-IO-Zlib perl-Digest-SHA perl-Mail-SPF \
perl-IP-Country perl-Razor2 perl-Net-Ident perl-IO-Socket-INET6 perl-IO-Socket-SSL perl-Mail-DKIM perl-DBI perl-Encode-Detect perl-HTML-Parser \
perl-HTML-Tagset perl-Time-HiRes perl-libwww-perl perl-Sys-Syslog perl-DB_File perl-Razor-Agent pyzor
 
Have you installed the perl/cpan requierements as suggested in the support article?

Code:
yum -y install perl-ExtUtils-MakeMaker perl-Digest-SHA perl-Net-DNS perl-NetAddr-IP perl-Archive-Tar perl-IO-Zlib perl-Digest-SHA perl-Mail-SPF \
perl-IP-Country perl-Razor2 perl-Net-Ident perl-IO-Socket-INET6 perl-IO-Socket-SSL perl-Mail-DKIM perl-DBI perl-Encode-Detect perl-HTML-Parser \
perl-HTML-Tagset perl-Time-HiRes perl-libwww-perl perl-Sys-Syslog perl-DB_File perl-Razor-Agent pyzor

Hey, yes i have done that all.

Code:
yum -y install perl-ExtUtils-MakeMaker perl-Digest-SHA perl-Net-DNS perl-NetAddr-IP perl-Archive-Tar perl-IO-Zlib perl-Digest-SHA perl-Mail-SPF \
> perl-IP-Country perl-Razor2 perl-Net-Ident perl-IO-Socket-INET6 perl-IO-Socket-SSL perl-Mail-DKIM perl-DBI perl-Encode-Detect perl-HTML-Parser \
> perl-HTML-Tagset perl-Time-HiRes perl-libwww-perl perl-Sys-Syslog perl-DB_File perl-Razor-Agent pyzor
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.fileplanet.com
 * epel: d2lzkl7pfhq30w.cloudfront.net
 * extras: centos.mirror.constant.com
 * updates: ewr.edge.kernel.org
Package perl-ExtUtils-MakeMaker-6.68-3.el7.noarch already installed and latest version
Package 1:perl-Digest-SHA-5.85-4.el7.x86_64 already installed and latest version
Package perl-Net-DNS-0.72-6.el7.x86_64 already installed and latest version
Package perl-NetAddr-IP-4.069-3.el7.x86_64 already installed and latest version
Package perl-Archive-Tar-1.92-2.el7.noarch already installed and latest version
Package 1:perl-IO-Zlib-1.10-294.el7_6.noarch already installed and latest version
Package 1:perl-Digest-SHA-5.85-4.el7.x86_64 already installed and latest version
Package perl-Mail-SPF-2.8.0-4.el7.noarch already installed and latest version
No package perl-IP-Country available.
No package perl-Razor2 available.
No package perl-Net-Ident available.
Package perl-IO-Socket-INET6-2.69-5.el7.noarch already installed and latest version
Package perl-IO-Socket-SSL-1.94-7.el7.noarch already installed and latest version
Package perl-Mail-DKIM-0.39-8.el7.noarch already installed and latest version
Package perl-DBI-1.627-4.el7.x86_64 already installed and latest version
Package perl-Encode-Detect-1.01-13.el7.x86_64 already installed and latest version
Package perl-HTML-Parser-3.71-4.el7.x86_64 already installed and latest version
Package perl-HTML-Tagset-3.20-15.el7.noarch already installed and latest version
Package 4:perl-Time-HiRes-1.9725-3.el7.x86_64 already installed and latest version
Package perl-libwww-perl-6.05-2.el7.noarch already installed and latest version
Package perl-Sys-Syslog-0.33-3.el7.x86_64 already installed and latest version
Package perl-DB_File-1.830-6.el7.x86_64 already installed and latest version
Package perl-Razor-Agent-2.85-15.el7.x86_64 already installed and latest version
Package pyzor-0.5.0-10.el7.noarch already installed and latest version
Nothing to do
 
Did you also did this first?
Code:
[server]# cpan
cpan> o conf prerequisites_policy follow
cpan> o conf commit
cpan> quit

Because it's saying you do not have an urllist.
If it still shows the same error then try:
Code:
cpan
cpan
cpan> o conf init
and put in a No and check things. Most you can just hit enter, but there will be a certain point you can set some locations to get files from. Set a couple of them (I always use 4 or 5) and go further to the end.
Don't forget to issue a "o conf commit" to save.
Maybe a cpan reload and then try to install the missing things again.
 
Did you also did this first?
Code:
[server]# cpan
cpan> o conf prerequisites_policy follow
cpan> o conf commit
cpan> quit

Because it's saying you do not have an urllist.
If it still shows the same error then try:
Code:
cpan
cpan
cpan> o conf init
and put in a No and check things. Most you can just hit enter, but there will be a certain point you can set some locations to get files from. Set a couple of them (I always use 4 or 5) and go further to the end.
Don't forget to issue a "o conf commit" to save.
Maybe a cpan reload and then try to install the missing things again.

Yes i did that. I cannot understand what is causing the issue.
 
You've got multiple versions installed, see:

ERROR: the required HTML::parser module is installed (3.35),

and

Package perl-HTML-Parser-3.71-4.el7.x86_64 already installed and latest version.

That might be you have several Perl versions installed.

So I would suggest that you clean modules installed by CPAN and stick to RPM packages.

Code:
yum install spamassassin -y && yum erase spamassassin -y

should install all the required packages. And then try custombuild to install spamassassin again.
 
You've got multiple versions installed, see:

ERROR: the required HTML::parser module is installed (3.35),

and

Package perl-HTML-Parser-3.71-4.el7.x86_64 already installed and latest version.

That might be you have several Perl versions installed.

So I would suggest that you clean modules installed by CPAN and stick to RPM packages.

Code:
yum install spamassassin -y && yum erase spamassassin -y

should install all the required packages. And then try custombuild to install spamassassin again.

I am wondering how to remove cpan modules? I did not find a working solution.
 
Got one from Perltricks.com some time ago, which was working for me. Use at your own risk.

Create a file called remove-module.pl or something like that with this content:
Code:
# uninstall_perl_module.pl from PerlTricks.com

use ExtUtils::Installed;
use ExtUtils::Packlist;

# Exit unless a module name was passed
die ("Error: no Module::Name passed as an argument. E.G.\n\t perl $0 Module::Name\n") unless $#ARGV == 0;

my $module = shift @ARGV;

my $installed_modules = ExtUtils::Installed->new;

# iterate through and try to delete every file associated with the module
foreach my $file ($installed_modules->files($module)) {
    print "removing $file\n";
    unlink $file or warn "could not remove $file: $!\n";
}

# delete the module packfile
my $packfile = $installed_modules->packlist($module)->packlist_file;
print "removing $packfile\n";
unlink $packfile or warn "could not remove $packfile: $!\n";

# delete the module directories if they are empty
foreach my $dir (sort($installed_modules->directory_tree($module))) {
    print("removing $dir\n");
    rmdir $dir or warn "could not remove $dir: $!\n";
}

usage:
Code:
perl remove-module.pl modulename
for example
Code:
perl remove-module.pl Net::DNS
 
Got one from Perltricks.com some time ago, which was working for me. Use at your own risk.

Create a file called remove-module.pl or something like that with this content:
Code:
# uninstall_perl_module.pl from PerlTricks.com

use ExtUtils::Installed;
use ExtUtils::Packlist;

# Exit unless a module name was passed
die ("Error: no Module::Name passed as an argument. E.G.\n\t perl $0 Module::Name\n") unless $#ARGV == 0;

my $module = shift @ARGV;

my $installed_modules = ExtUtils::Installed->new;

# iterate through and try to delete every file associated with the module
foreach my $file ($installed_modules->files($module)) {
    print "removing $file\n";
    unlink $file or warn "could not remove $file: $!\n";
}

# delete the module packfile
my $packfile = $installed_modules->packlist($module)->packlist_file;
print "removing $packfile\n";
unlink $packfile or warn "could not remove $packfile: $!\n";

# delete the module directories if they are empty
foreach my $dir (sort($installed_modules->directory_tree($module))) {
    print("removing $dir\n");
    rmdir $dir or warn "could not remove $dir: $!\n";
}

usage:
Code:
perl remove-module.pl modulename
for example
Code:
perl remove-module.pl Net::DNS

Hey Richard.

Alright, ill give it a try. Thanks.
 
Hello.

You're welcome.
But please do not quote complete messages better use the reply button (without quote), especially if your answer is right below the post.:)
 
Back
Top