I guess I haven't installed enough non-pure-Perl modules, but I can't figure this out. Here's what I'm seeing:
[root@localhost ~]# cpan make XML::LibXML CPAN: Term::ANSIColor loaded ok (v4.02) CPAN: Storable loaded ok (v2.34) Reading '/root/.cpan/Metadata' Database was generated on Thu, 06 Mar 2014 11:17:02 GMT Don't be silly, you can't install Matthias Kerk ;-) CPAN: Time::HiRes loaded ok (v1.9725) Running install for module 'XML::LibXML' Running make for S/SH/SHLOMIF/XML-LibXML-2.0111.tar.gz CPAN: Digest::SHA loaded ok (v5.84) CPAN: Compress::Zlib loaded ok (v2.06) Checksum for /root/.cpan/sources/authors/id/S/SH/SHLOMIF/XML-LibXML-2. +0111.tar.gz ok CPAN: Archive::Tar loaded ok (v1.90) ... CPAN: File::Temp loaded ok (v0.22) CPAN: Parse::CPAN::Meta loaded ok (v1.4404) CPAN: CPAN::Meta loaded ok (v2.120921) CPAN: Module::CoreList loaded ok (v2.80) CPAN.pm: Building S/SH/SHLOMIF/XML-LibXML-2.0111.tar.gz enable native perl UTF8 running xml2-config...didn't manage to get libxml2 config, guessing options: LIBS='-L/usr/local/lib -L/usr/lib -lxml2 -lm' INC='-I/usr/local/include -I/usr/include' If this is wrong, Re-run as: $ /opt/ActivePerl-5.16/bin/perl-static Makefile.PL LIBS='-L/path/to/ +lib' INC='-I/path/to/include' Checking for ability to link against xml2...no Checking for ability to link against libxml2...libxml2, zlib, and/or t +he Math library (-lm) have not been found. Try setting LIBS and INC values on the command line Or get libxml2 from http://xmlsoft.org/ If you install via RPMs, make sure you also install the -devel RPMs, as this is where the headers (.h files) are. Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter to see the exact reason why the detection of libxml2 installation failed or why Makefile.PL was not able to compile a test program. No 'Makefile' createdCPAN: YAML::XS loaded ok (v0.39) SHLOMIF/XML-LibXML-2.0111.tar.gz /opt/ActivePerl-5.16/bin/perl-static Makefile.PL INSTALLDIRS=site -- + NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Could not read metadata file. Falling back to other methods to determi +ne prerequisites
It looks like the LIBS is looking for xml2 not libxml2; only the latter is installed on my system.
[root@localhost ~]# find / -name 'xml2.so*' [root@localhost ~]# find / -name 'libxml2.so*' /usr/lib64/libxml2.so.2.6.26 /usr/lib64/libxml2.so.2 /usr/lib/libxml2.so.2.6.26 /usr/lib/libxml2.so.2 [root@localhost ~]#
Is there some way to override the value of LIBS from the cpan command line? Or do I need to figure out where to run the suggested 'perl-static Makefile.PL' command? Or is there something else I'm missing? Thanks!

In reply to can't install XML::LibXML under ActivePerl by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.