[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can't install XML::Mini from CPAN on Woody

On Wed, May 14, 2003 at 09:15:08AM -0500, Nathan E Norman wrote:
> On Tue, May 13, 2003 at 10:43:12PM -0400, Carl Fink wrote:
> > Someone on the VOCP mailing list suggested I do this:
> > 
> > 	perl -MCPAN -e shell
> > 	install XML::Mini
> > 
> > from the shell.

It's a reality of life that sometimes when you are trying to set up a
tool written in Perl, you are going perforce going to have to learn more
about Perl and its innards and traditions than you intended to. So, for
starters, you'd have been wise to `man CPAN', and then you would have
been able to ask a more informed question, like "why is CPAN unable to
get an FTP connection to any of those hosts, to fetch the database
listing files that innumerate the modules currently available on the
CPAN?" But there is more you really need to know about the specific
additional issues of administering a Debian GNU/Linux Perl installation,
and in a way maybe it was protection (fortunate) that CPAN didn't do it
for you.

> > Well, it tries to install the module, but I get errors of this form:
> > 
> >       Fetching with LWP:
> >         ftp://archive.progeny.com/CPAN/authors/01mailrc.txt.gz
> >       LWP failed with code[400] message[FTP return code 000]
> >       Fetching with Net::FTP:
> >         ftp://archive.progeny.com/CPAN/authors/01mailrc.txt.gz
> >       Couldn't fetch 01mailrc.txt.gz from archive.progeny.com
  {snip} .. then:
> >       Fetching with LWP:
> >         http://www.perl.com/CPAN/authors/01mailrc.txt.gz
> >       Going to read /root/.cpan/sources/authors/01mailrc.txt.gz

There, you got the first piece. See? "LWP", that is, the Perl
"libwww-perl" module package, was finally able to get a mirror
(www.perl.com) to give it the "01mailrc.txt.gz" file. Then it tries:

> >       Fetching with LWP:
> >         ftp://archive.progeny.com/CPAN/modules/02packages.details.txt.gz
> >       LWP failed with code[400] message[FTP return code 000]

There, LWP was unable to fetch the "02packages.details.txt.gz" file, and
gave up with a return code.

> > I know little about Perl and CPAN beyond "scripting language" and "module
> > repository".  Can anyone who has experience with both Perl and Debian tell
> > me what I'm doing wrong here?  I would appreciate it greatly.
> First, install "dh-make-perl" and use it to build perl modules from
> CPAN.  This will lower the probability that you will hose your perl
> installation.

I think I'll comment on this down below. So, skip it for now ...

> Second, you seem to have a problem with FTP.  Are you going through a
> proxy or firewall?  I'd guess that you are, and your firewall doesn't
> know how to NAT FTP connections.  You can try passive FTP or just
> download stuff from CPAN via HTTP (use wget).

I second that guess. It seems a likely possibility to me. You have to
set up iptables or ipchains fairly carefully to get secured FTP from
behind a firewall (with NAT).

> Finally, you don't _need_ to build stuff from CPAN via "perl -MCPAN -e
> shell"; you can download the files manually and build locally (I still
> recommend building with dh-make-perl though).  Just point your browser
> at http://www.cpan.org and start navigating.  Most perl modules have
> at least adequate documentation; if you've ever built software out of
> a tarball you'll be able to handle it.
Right, I second that in this instance and encourage the O.P. to find a
way to manually download the CPAN tarball and after unpacking it into a
temporary build directory, try typing `perl Makefile.PL' followed by
`make' and then 'make test'. If all that goes well -- and you'll know if
it does not -- then you might as well follow the advise to use
dh-make-perl (although I haven't ever yet used dh-make-perl so I cannot
authoritatively speak to that subject). What I am suggesting is that you
try it the "fully manual Perl way" _without running `make install'_
_first_ and THEN investigate the dh-make-perl option. By doing so you
will come to understand fairly fundamental and crucial things about how
Perl extension modules are installed on nearly every kind of platform
that runs Perl, then you'll see a Debian-specific solution to the
problem of Perl extension module management (because what dh-make-perl
does is bridge between the apt-dpkg Debian package tracking system, and
the non-Debian, generic *NIX -centric proceedures for adding modules to

Also, WRT the fact that CPAN failed for you, you might, if you become
informed (very important) and not ignorant about "why you might not want
to use CPAN.pm to install Perl extensions on your Debian system", then
want to try to look into the firewalling explanation and also look at
choosing different mirrors to try to get your modules from. To do so you
run CPAN.pm in interactive mode:

    perl -MCPAN -e shell

and then at the prompt (the CPAN shell prompt), type:

    o conf init

which will take you through the CPAN.pm initialization dialog wherein
you get to (re-)select your mirrors.

See my OpenPGP key at https://savannah.gnu.org/people/viewgpg.php?user_id=6050
GnuPG public key fingerprint  | "Only when efforts to reform society have as
 BD26 A5D8 D781 C96B 9936     |  their point of departure the reformation of
 310F 0573 A3D9 4E24 4EA6     |  the inner life -- human revolution -- will
they lead us with certainty to a world of lasting peace and true human security."
                                -- Daisaku Ikeda

Reply to: