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

The machines I use at work are being upgraded to CentOS 5.2. This doesn't have XML::Twig or its dependency XML::Parser installed. I've got the CPAN shell working and installing things to various NFS places that I can write to as a non-root user. I need a solution that works with NFS files - getting the sysadmins to install the yum package would require them to repeat this several hundred times as my scripts need to be run on large clusters of machines.

When I try to install XML::Parser (2.36), I get errors: Expat.xs:12:19: error: expat.h: No such file or directory. I've downloaded expat-2.0.1 and installed it, and run Makefile.PL with the EXPATLIBPATH and EXPATINCPATH pointing to the directory into which it was installed, and to the lib path of the expat source package, but it seems to make no difference. I've read the backlog of suggestions about this in perlmonks, but none of the ideas there seem to have worked.

Replies are listed 'Best First'.
Re: expat.h / XML::Parser 2.36 / CentOS 5.2 non-root installation
by Anonymous Monk on Mar 17, 2009 at 16:44 UTC
    Weird ... try editing Makefile.PL manually, set
    $expat_libpath = ''; $expat_incpath = '';
    or try adding
    WriteMakefile( .... 'INC' => '-Ipath/to/expat', 'LIBS' => '-Lpath/to/expat -lexpat', );
    one of them should work
      try : yum install expat-devel