I found that installing native Debian or Ubuntu Perl packages, such is often more reliable and convenient than "manually" installing Perl modules via cpanm
(especially for XS-Modules). Is there an easy way to find these modules given a list of required Perl modules? The most convenient way would be to map a cpanfile, such as
requires 'XML::LibXSLT', '1.78';
to a list of distributions and packages that provide the modules for different target platforms:
XML::LibXSLT, Ubuntu 13.04, libxml-libxslt-perl, 1.78
XML::LibXSLT, Ubuntu 13.10, libxml-libxslt-perl, 1.78
XML::LibXSLT, Ubuntu 14.04, libxml-libxslt-perl, 1.84
XML::LibXSLT, Debian squeeze, libxml-libxslt-perl, 1.70
XML::LibXSLT, Debian wheezy, libxml-libxslt-perl, 1.77
XML::LibXSLT, Debian jessie, libxml-libxslt-perl, 1.92
XML::LibXSLT, Debian sid, libxml-libxslt-perl, 1.92
P.S.: I guess the information can somehow be looked up from the package repositories of each distribution, e.g. http://packages.ubuntu.com/ and https://packages.debian.org but is there a scriptable solution that already does this lookup?
On Debian-based systems, install the dh-make-perl
package and try
dh-make-perl locate XML::LibXSLT
On my LMDE box, it outputs:
== dh-make-perl 0.80 ==
Using cached Contents from Thu Sep 18 13:23:19 2014
XML::LibXSLT is in libxml-libxslt-perl package
For mapping this package name to other Linux distros, you could use distromatch. It also seems to support Perl
(CPAN
) and Python
package names. Unfortunately, distromatch
seems to be unmaintained and does not work out-of-the-box now. Recently I did manage to make it work well enough for translating Debian to openSUSE package names.
Simple. Just search with the keyword. It will list all relevant packages. Then you can install the one you want.
e.g. on my ubuntu 12.04, I searched for LibXSLT
:
$ sudo aptitude search LibXSLT
p libxml-libxslt-perl - Perl interface to the GNOME libxslt library
v libxslt-dev -
p libxslt1-dbg - XSLT 1.0 processing library - debugging symbols
p libxslt1-dev - XSLT 1.0 processing library - development kit
i A libxslt1.1 - XSLT 1.0 processing library - runtime library
p libxsltc-java - XSL Transformations (XSLT) compiler from Xalan-Java
p libxslthl-java - XSLT syntax highlighting
p python-libxslt1 - Python bindings for libxslt1
p python-libxslt1-dbg - Python bindings for libxslt1 (debug extension)
v python2.7-libxslt1 -
v python2.7-libxslt1-dbg -
So, as listed above, it is quite evident that you want to install libxml-libxslt-perl
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With