Alois Mahdal Alois Mahdal - 1 year ago 225
Perl Question

How to install XML::Parser without expat-devel?

XML::Parser fails to build on a quite fresh 64-bit Debian box. After issuing

cpan XML::Parser
, cpan fails with lots of errors about Expat.c and Expat.xs:

Expat.xs:2182: error: ‘CallbackVector’ has no member named ‘skip_until’
Expat.c: In function ‘XS_XML__Parser__Expat_Do_External_Parse’:
Expat.c:2904: error: ‘XML_Parser’ undeclared (first use in this function)
Expat.c:2904: error: expected ‘;’ before ‘parser’
Expat.xs:2194: error: ‘parser’ undeclared (first use in this function)
make[1]: *** [Expat.o] Error 1
make[1]: Leaving directory `/root/.cpan/build/XML-Parser-2.41-rpV6ok/Expat'
make: *** [subdirs] Error 2
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible

Message at the start of the output explains that expat-devel is needed for building.

Expat must be installed prior to building XML::Parser and I can't find
it in the standard library directories. Install 'expat-devel' package with your
OS package manager. See 'README'.

But expat-devel is not in Debian repository.

Is it possible to get over this without need to build/install expat from source?

Answer Source

The package you want to install is named libexpat1-dev. You could also just install libxml-parser-perl via apt-get. Or if you really want to install via CPAN try installing the Debian packages dependencies first via apt-get build-dep libxml-parser-perl.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download