0

I'm trying to install XML::Parser in RHEL8 Linux and have both OS RPM packages 'expat' and 'expat-devel' installed. I also have a successful expat Perl module installation running:

cpanm XML::Parser::Expat
XML::Parser::Expat is up to date. (2.46) 

I'm running cpanm XML::Parser and getting:

Expat must be installed prior to building XML::Parser

and I can't find it in the standard library directories.

I also tried specifying these:

  • EXPATLIBPATH=... To set the directory in which to find libexpat
  • EXPATINCPATH=... To set the directory in which to find expat.h

And running

perl Makefile.PL EXPATLIBPATH=/usr/lib EXPATINCPATH=/usr/include

but with no difference. Any suggestions?

Gilles Quénot
  • 1,313
  • 10
  • 17
codecat
  • 1
  • 1

1 Answers1

0

It looks like you have installed the expat package and expat Perl module, but the XML::Parser module is still not finding it. Try installing the expat-devel package which contains the header files needed for the XML::Parser installation. If that doesn't work, you can try specifying the EXPATLIBPATH and EXPATINCPATH environment variables when running the Perl Makefile.PL command to point to the directories where expat is installed.

  • Thanks for replying. If you reread my post you'll notice that I already tried both of those. Both expat and expat-devel are installed and I tried the two ENV variables. – codecat Feb 27 '23 at 14:50