in reply to Trouble installing XML::Parser

Yes, I've been caught like this before. The junoscript-perl package (probably mistakenly) contains a module called install, so when you mistakenly supply the 'install' command on the cpan command line it tries to install that whole package. You don't need to do that a simple:

cpan XML::Parser
Will suffice.

If you are sufficiently annoyed by this you might want to submit a bug report to either the author of junoscript to rename the module called install, or to the maintainer of CPAN, or the maintainer of the PAUSE indexer. All three are conspiring to cause this in a horrible coincidence.

/J\

Replies are listed 'Best First'.
Re^2: Trouble installing XML::Parser
by apprentice (Scribe) on May 05, 2006 at 15:02 UTC
    I tried this, but still get similar errors. I also tried the suggestion from Mirod, to no avail. However, I have tried to narrow the problem down a bit more. There are a ton of errors, but the following are just the beginning and expat.h is definitely not there!
    Expat.xs:12:19: expat.h: No such file or directory Expat.xs:60: error: syntax error before "XML_Parser" Expat.xs:60: warning: no semicolon at end of struct or union Expat.xs:78: error: syntax error before ':' token Expat.xs:79: error: syntax error before ':' token Expat.xs:80: error: syntax error before ':' token Expat.xs:106: error: syntax error before '}' token Expat.xs:106: warning: data definition has no type or storage class Expat.xs:111: error: syntax error before "nsdelim" Expat.xs:111: warning: data definition has no type or storage class Expat.xs:117: error: syntax error before '*' token Expat.xs:118: error: syntax error before '*' token


    "Peace, love, and Perl...well, okay, mostly just Perl!" --me

    Apprentice

      Depending on your platform you may have to install an 'expat-devel' package or compile expat from source in order to get the required header files.

      /J\

        Thanks for this tip. I just upgraded my Linux server to Fedora 9 and have been struggling to get XML::Parser installed for a few days. Doing as you suggested, I did the following:

        yum install expat-devel

        Once this was installed, I was able to install XML::Parser and a some related modules (e.g., XML::RSS).

      Expat.xs:12:19: expat.h: No such file or directory

      http://search.cpan.org/src/MSERGEANT/XML-Parser-2.34/README
      This is a Perl extension interface to James Clark's XML parser, expat.
      It requires at least version 5.004 of perl and it requires that you have
      release 1.95.0 or greater of expat installed. You can download expat from:
          http://sourceforge.net/projects/expat/