cpan initialisation failure

Hi,

Please see the attached log. Apparently webmin cannot properly initialise cpan (gets in a loop when asked to choose a country mirror).

Status: 
Active

Comments

Hmm, looks like a perl module is attempting to auto-install another module from CPAN..

The only work-around is to do one Perl module first from the command line, with a command like :

perl -MCPAN -e "install Authen::Libwrap"

Well then, I guess we can close this one (unless there's a way for webmin to write some stuff in /root/.cpan so it doesn't get in a loop - at least I don't see other solution right now). Anyway, this is hardly a big issue but some novice users could get bitten.

I've looked into ways to automate this, but unfortunately I couldn't find a way. Ideally it would be possible to tell CPAN to auto-configure and pick a mirror itself, but there doesn't seem to be any such function.

Worst still, some perl modules like this one call CPAN from their install scripts, rather than defining dependencies that Webmin can resolve :-(

Automatically closed -- issue fixed for 2 weeks with no activity.

Joe's picture
Submitted by Joe on Tue, 03/22/2011 - 17:20 Pro Licensee

CPAN has recently had a come to Jesus moment, with regard to usability, and the freakshow that is the current CPAN configuration process will eventually be a thing of the past. (http://www.dagolden.com/index.php/1264/slimmer-cpan-configuration/)

But to answer your questions:

Where does this command get entered?

From the command line as root.

Will this process stop it from being needed again?

For this particular module, yes. But, there may be other modules that do the same thing, and break in the same way, though if you were to first configure cpan manually and fully, I would expect it to work relatively painlessly for most cases (but I'm not certain of that, cpan is a nightmare, and I've never been able to make it work consistently when called from scripts, though Jamie has worked miracles in making it work at all from within Webmin, so it obviously can be done for some modules some of the time in some environments).

Is there no way for Webmin to have a localization selection somewhere where perl can find it?

I don't know. I'll have to leave that one to Jamie. But, my guess would be that if Webmin tried to solve this (for example by doing something like this: http://www.perlmonks.org/?node_id=586024 ) it would lead to problems with cpan getting configured incorrectly, and/or ignoring the configuration someone has manually done on their system. I don't see any way we can win in the fight against cpan, until the non-broken version of cpan becomes widespread. If we force our (guessed) configuration into place, it'll break for people who have to have a special configuration.

Last time I looked into this, I couldn't find any reliable automated way of configuring CPAN with sensible defaults :-(