Hello! I am trying to install XML::Parser, and I understand that before I do that I have to install expat. I launch a Terminal window and type "sudo port install expat" and that gives the following output:

---> Fetching archive for expat ---> Attempting to fetch expat-2.0.1_1.darwin_10.x86_64.tbz2 from http://packages.macports.org/expat ---> Fetching expat ---> Attempting to fetch expat-2.0.1.tar.gz from http://ykf.ca.distfiles.macports.org...istfiles/expat ---> Verifying checksum(s) for expat ---> Extracting expat ---> Configuring expat ---> Building expat ---> Staging expat into destroot ---> Installing expat @2.0.1_1 ---> Activating expat @2.0.1_1 ---> Cleaning expat

I then type "port installed" and "expat @2.0.1_1 (active)" appears. So far so good. I then try to install XML::Parser. I downloaded XML- Parser-2.41.tar.gz. I cd to my Downloads folder and type in "gzip -d XML-Parser-2.41.tar.gz" and "tar xvf XML-Parser-2.41.tar.gz" and that creates a directory called XML-Parser-2.41. I cd to that directory and type "perl Makefile.pl" and I receive the following error message:

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'.

I try to install expat-devel by typing in "sudo port install expat- devel" but that gives an error message "Error: Port expat-devel not found." I am completely at a loss here. Where am I going wrong? Is expat still not completely installed? Is there some additional configuring I need to do before moving on to the XML::Parser step?


In reply to Having trouble installing expat and XML::Parser on Mac OS X. Please help! by MrSnrub

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.