I am trying to install DBD::Spatialite using cpan but I keep getting the error:

"The module DBD::Spatialite isn't available on CPAN. Either the module has not yet been uploaded to CPAN, or it is temporary unavailable."

It does seem to be on CPAN (see here) though not on metacpan. When I switch to cpanm it does find it:

Searching DBD::Spatialite on cpanmetadb ... -> FAIL Finding DBD::Spatialite on cpanmetadb failed. Searching DBD::Spatialite on search.cpan.org ... --> Working on DBD::Spatialite

That's as far as cpanm gets though as it then runs into the same problems as manual install. When I try to install manually Makefile.PL fails to find the C libraries required. I suspect this is because the libraries are in the /opt/local/ directory:

OS unsupported - GEOS libraries could not be found. Please install GE +OS, or else specify where it can be found via the CC_LIBPATH and CC_I +NCPATH parameters.

So I'm wondering how do I specify the correct path? I have tried a few like:

perl Makefile.PL CC_LIBPATH=-I/opt/local/lib CC_INCPATH=-I/opt/local/i +nclude
But no joy. Thanks for any help.

In reply to Problem installing DBD::Spatialite from CPAN by tangent

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.