Search code examples
perlperl-modulecpanxml-libxmlcpanm

Download XML::LibXML and its dependencies


I want to install XML::LibXML (among others) on a Linux 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

Thanks.


Solution

  • 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