mikedu95 mikedu95 - 4 months ago 46
Perl Question

Download XML::LibXML and its dependencies

I have installed Perl 5.16.3 from sources in a local directory and now I want to install XML::LibXML (among others) on a redhat machine with no internet and no root access.

My current solution is to download XML::LibXML and its dependencies from Windows, with strawberry perl, then install them on my linux machine. But I haven't find out how to do that.

Here's what I've tried:

First, I download XML::LibXML from Windows CPAN shell:

cpan[1]>get XML::LibXML


And it successfully downloads the package into:

C:\Users\mikedu95\.cpan\sources\authors\id\S\SH\SHLOMIF\XML-LibXML-2.0128.tar.gz


But not its dependencies. Indeed, now on Linux:

cpanm XML::LibXML --from /data/cpan/sources/

--> Working on XML::LibXML
Fetching file:///data/cpan/sources/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0128.tar.gz ... OK
Configuring XML-LibXML-2.0128 ... OK
==> Found dependencies: XML::SAX, XML::SAX::Exception, XML::NamespaceSupport, XML::SAX::Base
--> Working on XML::SAX
Fetching file:///data/cpan/sources/authors/id/G/GR/GRANTM/XML-SAX-0.99.tar.gz ... OK
Configuring XML-SAX-0.99 ... OK


We can see that XML::LibXML and its dependency XML::SAX are correctly found in my local mirror
/data/cpan/sources/
, because I have downloaded XML::SAX too.

However, the other dependencies are not found:

==> Found dependencies: XML::NamespaceSupport, XML::SAX::Base
--> Working on XML::NamespaceSupport
Fetching file:///data/cpan/sources/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.11.tar.gz ... FAIL
! Download file:///data/cpan/sources/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.11.tar.gz failed. Retrying ...
! Download file:///data/cpan/sources/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.11.tar.gz failed. Retrying ...
! Download file:///data/cpan/sources/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.11.tar.gz failed. Retrying ...
! Failed to download file:///data/cpan/sources/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.11.tar.gz
! Failed to fetch distribution XML-NamespaceSupport-1.11


In the other hand, if I install rather than get XML::LibXML, then it downloads and install the dependencies but that doesn't suit me.

Indeed, I want also the dependencies to be saved under the directory
C:\Users\mikedu95\.cpan\sources
, so I will be able to install them on the linux machine.

Thanks.

And sorry for the very long question for a very minor problem :(

Answer

Installing XML::LibXML is unlikely to be the last of your requirements, and I suggest that you use minicpan to create a local CPAN mirror which you can copy to your off-line system. You can then install anything you like from that mirror

Comments