Submitted by Lucian on Fri, 02/11/2011 - 20:17
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
Hi,
Please see the attached log. Apparently webmin cannot properly initialise cpan (gets in a loop when asked to choose a country mirror).
Comments
Submitted by JamieCameron on Sun, 02/13/2011 - 12:50 Comment #1
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"
Submitted by Lucian on Sun, 02/13/2011 - 14:45 Comment #2
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.
Submitted by JamieCameron on Mon, 02/14/2011 - 13:52 Comment #3
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 :-(
Submitted by Issues on Mon, 02/28/2011 - 18:21 Comment #4
Automatically closed -- issue fixed for 2 weeks with no activity.
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.
Submitted by JamieCameron on Tue, 03/22/2011 - 23:04 Comment #7
Last time I looked into this, I couldn't find any reliable automated way of configuring CPAN with sensible defaults :-(