Spamassassin install fails cpan modules

astra

Verified User
Joined
Mar 4, 2009
Messages
95
Hi,

We have installed 2 new servers with centos 5.5 and everything go oke till we wanna install spamassassin via http://help.directadmin.com/item.php?id=36 if we run:

Code:
PERL_MM_USE_DEFAULT=1 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
the systems gives a msg back:

Code:
Select your continent (or several nearby continents) []
Sorry! since you don't have any existing picks, you must make a
geographic selection.

(1) Africa
(2) Asia
(3) Australasia
(4) Central America
(5) Europe
(6) North America
(7) Oceania
(8) South America
Select your continent (or several nearby continents) []
Sorry! since you don't have any existing picks, you must make a
geographic selection.

(1) Africa
(2) Asia
(3) Australasia
(4) Central America
(5) Europe
(6) North America
(7) Oceania
(8) South America
Select your continent (or several nearby continents) []
Sorry! since you don't have any existing picks, you must make a
geographic selection.
and loops again and again.

Some one who know how to solve this issue?

Thanks a lot.
 

astra

Verified User
Joined
Mar 4, 2009
Messages
95
Problem solved with:

Code:
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
 
Last edited:

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
When you first use CPAN it asks you which CPAN mirrors you want to use. It appears you dind't bother to type in the continent first.

Jeff
 

shanuvarma

Verified User
Joined
May 26, 2008
Messages
11
Location
Manchester, UK
cpan install error

I have this same error but it does not allow me to choose a continent - it just keeps looping with the same message above

how to fix this please?
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
I had this problem yesterday. I ran the line in post #2 to this thread twice; the second time it did work.

Inexplicably. I'm going to do another install today; we'll see, and I'll post again.

Jeff
 

Trans-IX B.V.

Verified User
Joined
Mar 4, 2009
Messages
31
Location
The Netherlands
Referring to: http://help.directadmin.com/item.php?id=36

I see that the KB was "Last Modified: Mar 25, 2011, 12:28 am"

I know the 'old' KB was working, but now I also get the loop as explained in the first post of this topic.

Don't use PERL_MM_USE_DEFAULT=1 or you will get the loop.

If you already did, then you should try PERL_MM_USE_DEFAULT=0

I tried running the following as mentioned in the KB, but it did not install everything:
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

After running the above, the following modules which are needed are not installed:

NetAddr::IP Mail::SpamAssassin::plugin::Razor2 Razor2::Client::Agent IO::Socket::SSL DBI

So I added these modules here;

cpan -i Archive::Tar Digest::SHA IP::Country Net::Ident IO::Socket::INET6 Compress::Zlib Mail::DKIM LWP::UserAgent HTTP::Date Encode::Detect ExtUtils::MakeMaker NetAddr::IP Mail::SPF Mail::SpamAssassin::plugin::Razor2 Razor2::Client::Agent IO::Socket::SSL DBI

Then you can run ./spam.sh to install SpamAssassin, but after that I get the following error which I haven't been able to resolve:

http: GET http://spamassassin.apache.org/updates/MIRRORED.BY request failed: 500 Server closed connection without sending any data back: Server closed connection without sending any data back at /usr/lib/perl5/vendor_perl/5.8.8/Net/HTTP/Methods.pm line 306.
error: no mirror data available for channel updates.spamassassin.org
channel: MIRRORED.BY contents were missing, channel failed


Any news on this issue Jeff ?

Mark
 
Last edited:

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Not from me, as I said, my try was successful.

Perhaps someone else will respond.

Jeff
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,988
Hello,

I've tweaked the guide slightly to account for the case that cpan was never run before.

Recent changes:
1) 1.38.0, we do not install the tar.gz modules in the spam.sh script. They tended to be contantly out of date, but more importantly, they had many prerequisites which were rarely all met. Cpan does a much better job of installing all missing perl modules.

2) Newer versions of SA needed more modules which were not previously listed there anyway, again, cpan is simpler (no point in re-inventing the wheel).

3) The issue I had with cpan is having to wait around all day pounding away at the "y" option, as it kept finding more missing prerequisite modules were needed. ("prepend to list" question). Googling around returned the 2 export options PERL_MM_USE_DEFAULT=1 and PERL_EXTUTILS_AUTOINSTALL="--defaultdeps". The PERL_EXTUTILS_AUTOINSTALL="--defaultdeps" is a more recent find, so I'm not sure if the PERL_MM_USE_DEFAULT=1 options is even required anymore. The issue with the PERL_MM_USE_DEFAULT=1 option (recently discovered) is that it is basically a "auto pound of the enter key for all questions" solution, which is great for the prerequisites part, but if you've never run cpan before, all the setup questions that require you to type something will be like hitting enter without typing anything. I've updated the guide to only have the PERL_MM_USE_DEFAULT=1 option as a backup plan, if the PERL_EXTUTILS_AUTOINSTALL="--defaultdeps" option is not enough. I'm hoping that PERL_EXTUTILS_AUTOINSTALL="--defaultdeps" is in fact enough and we don't need to use the other option at all, as the defaultdeps mode is likely more specific to what we're trying to accomplish.

If anyone is getting the blank mirror error, then do what SeLLeRoNe mentioned, and type:
Code:
rm -rf /root/.cpan
but before re-running the cpan command, logout of ssh, and login again. We want to make sure that PERL_MM_USE_DEFAULT=1 is not set.... Or just set it to the other value to ensure it's off"
Code:
export PERL_MM_USE_DEFAULT=0
John
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,792
Location
A Coruña, Spain
im trying to build (and im almost done) a script that install new server with all packages and customization i use to use.

Everything is about automatic but at the moment the only imput i must insert are the cpan value (y y y country nation mirror etc).

Do you know if there is a single command line for put all those info automatically?

Thanks
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,988
Yes, when it asks about "are you ready for manual configuration", simply answer "no". Their wording is confusing. By refusing the manual config, it does it all for you with the defaults. You can probably start over by nuking your /root/.cpan folder.

John
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,792
Location
A Coruña, Spain
Yes i know about reply no at that line but, i would like to use italian mirror so download are pretty much faster, thats why i was wondering if was possible to set via command line.. or.. if there is a conf file to download into /root/.cpan (or somewhere else) before run cpan first time :)

Regards
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,988
I know that there is a whole cpan menu for options. If you use the default options, you can probably change just the mirror after it's all set. You could probably copy the configs from other boxes after it's setup once.. but I'm not sure exactly where everything needs to go to do that.
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,792
Location
A Coruña, Spain
Thanks a lot, i figured it out!

For who is interested the file is in:

/usr/lib/perl5/5.8.8/CPAN/Config.pm

Just save this file and before install.

Ive read that there is a -j config-filename option that will allow you to specific a custom option file during install.

Im gonna try this soon.

Regards
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,792
Location
A Coruña, Spain
Ok, here is it:

Save the file in /root/.cpan/CPAN/MyConfig.pm

Then just run cpan and will use your custom configuration.

Regards
 
Top