MattP has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I'm trying to install XML::CanonicalizeXML and am getting errors with make - "Not OK". I've had that with a few Perl modules in the past and I'm never really sure where to go. I think the problem is probably the line "canon.c:4:27: fatal error: libxml/parser.h: No such file or directory" - possibly libxml/parser.h is missing? Is this a linux system file or something to do with the module? Time to ask for some advice from the Monks.

I'm on SUSE linux by the way. I've printed the full install printout below.

cpan install XML::CanonicalizeXML.pm Loading internal null logger. Install Log::Log4perl for logging messag +es CPAN: Storable loaded ok (v2.51) Reading '/root/.cpan/Metadata' Database was generated on Mon, 03 Apr 2017 11:17:02 GMT Running install for module 'XML::CanonicalizeXML' CPAN: Digest::SHA loaded ok (v5.96) CPAN: Compress::Zlib loaded ok (v2.074) Checksum for /root/.cpan/sources/authors/id/S/SJ/SJZASADA/XML-Canonica +lizeXML-0.05.tgz ok CPAN: YAML loaded ok (v1.23) CPAN: CPAN::Meta::Requirements loaded ok (v2.140) CPAN: Parse::CPAN::Meta loaded ok (v2.150010) CPAN: CPAN::Meta loaded ok (v2.150010) Configuring S/SJ/SJZASADA/XML-CanonicalizeXML-0.05.tgz with Makefile.P +L Checking if your kit is complete... Looks good MakeMaker (v7.24) Warning (non-fatal): Target 'dynamic' depends on targets in skipped se +ction 'dynamic_lib' Warning (non-fatal): Target 'static' depends on targets in skipped sec +tion 'static_lib' Generating a Unix-style Makefile Writing Makefile for Mytest2::canon Writing MYMETA.yml and MYMETA.json Generating a Unix-style Makefile Writing Makefile for XML::CanonicalizeXML Writing MYMETA.yml and MYMETA.json SJZASADA/XML-CanonicalizeXML-0.05.tgz /usr/bin/perl Makefile.PL -- OK Running make for S/SJ/SJZASADA/XML-CanonicalizeXML-0.05.tgz CPAN: Module::CoreList loaded ok (v5.20170220) cp lib/XML/CanonicalizeXML.pm blib/lib/XML/CanonicalizeXML.pm AutoSplitting blib/lib/XML/CanonicalizeXML.pm (blib/lib/auto/XML/Canon +icalizeXML) cd canon && make make[1]: Entering directory `/root/.cpan/build/XML-CanonicalizeXML-0.0 +5-10/canon' cc -c -I. -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -fno-str +ict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFS +ET_BITS=64 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-p +rotector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe + -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.14.2/x86 +_64-linux-thread-multi/CORE" canon.c canon.c:4:27: fatal error: libxml/parser.h: No such file or directory compilation terminated. make[1]: *** [canon.o] Error 1 make[1]: Leaving directory `/root/.cpan/build/XML-CanonicalizeXML-0.05 +-10/canon' make: *** [canon/libcanon.a] Error 2 SJZASADA/XML-CanonicalizeXML-0.05.tgz make -- NOT OK

Thanks in advance for any help!

Matt

  • Comment on perl module XML::CanonicalizeXML won't install - issue with make / libxml
  • Download Code

Replies are listed 'Best First'.
Re: perl module XML::CanonicalizeXML won't install - issue with make / libxml
by marto (Cardinal) on Apr 03, 2017 at 14:31 UTC
    fatal error: libxml/parser.h: No such file or directory

    README:

    "This module requires these other modules and libraries:

    libxml2

    libxml2 development headers"

    So using Debian package management (the names will likely be the same/similar for SUSE):apt-get install libxml2 libxml2-dev. After that:

    cpanm XML::CanonicalizeXML --> Working on XML::CanonicalizeXML Fetching http://www.cpan.org/authors/id/S/SJ/SJZASADA/XML-Canonicalize +XML-0.05.tgz ... OK Configuring XML-CanonicalizeXML-0.05 ... OK Building and testing XML-CanonicalizeXML-0.05 ... OK Successfully installed XML-CanonicalizeXML-0.05 1 distribution installed

    Update: show working install

      Thanks Marto, thought it was something along these lines.

      Next issue, SUSE, at least this version, doesn't have apt-get. I'm used to Ubunto with apt-get and CentOS with Yum but a bit lost on this OS. An internet search pointed me to use zypper instead of apt-get - "zypper install libxml2 libxml2-dev". This claims to have upgraded libxml2, but not libxml2-dev - "Package 'libxml2-dev' not found."

      Have tested and XML::CanonicalizeXML is still giving the same error as before.

      Any thoughts/ideas?

      Thanks,

      Matt.

        I don't use SUSE, but a web search for 'zypper libxml2' shows that the package name you are looking for is libxml2-devel.