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

hi all i am a linux admin and one of my user asked me to install some modules in perl. I am using RHEL 5.4 and the perl version is 5.8.8 When i try to install the module XML/Parser i was getting the following error.
(i didnt post the whole error part)Expat.c:2687: error: âXML_Parserâ u +ndeclared (first use in this function) Expat.c:2687: error: expected â;â before âparserâ Expat.c:2688: warning: ISO C90 forbids mixed declarations and code Expat.xs:2194: error: âparserâ undeclared (first use in this function) Expat.xs:2194: warning: cast to pointer from integer of different size Expat.xs:2205: warning: unused variable âpretâ Expat.xs:2194: warning: unused variable âcbvâ Expat.xs:2192: warning: unused variable âtypeâ make[1]: *** [Expat.o] Error 1 make[1]: Leaving directory `/root/.cpan/build/XML-Parser-2.40/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
Please help me to solve this issue.

Replies are listed 'Best First'.
Re: problem in installing modules
by Corion (Patriarch) on Apr 25, 2011 at 10:21 UTC

    Have you made sure that RedHat has no prepackaged package for XML::Parser? At least a cursory redhat package xml::parser returns http://packages.sw.be/perl-XML-Parser/ (and likely more trusted repository elsewhere) that contains something that looks very much like the appropriate source RPMs for that package.

    I am no system administrator, at least not full time, but I prefer to use the OS package manager to install modules into the vendor provided Perl.

      thanks...i got the exact rpm to install the module and did that. But the thing is, now the system is keep on asking modules one by one. At last i installed the Tcl module and waiting for the user's update Thanks for your help
Re: problem in installing modules
by cdarke (Prior) on Apr 25, 2011 at 10:41 UTC
    Firstly, the 'â' is a quote, don't get distracted by that (probably because of your tty settings).

    Check that the dependant modules are the correct version. It looks to me that there is some sort of issue with a header file. In particular, from the XML::Parser README file:
    requires that you have release 1.95.0 or greater of expat installed. You can download expat from: http://sourceforge.net/projects/expat/ Install 'expat-devel' package with your OS package manager. Debian: expat-dev Xubuntu 6.06: libexpat1-dev
Re: problem in installing modules
by Anonymous Monk on Apr 25, 2011 at 10:14 UTC
    (i didnt post the whole error part)

    You should, it contains important details :)