Greetings,

I've recently returned to the Mac (OS X Version 10.7.2, to be precise) after years of developing simple web apps and maintaining our website using Perl on Windows. Everything was going fine recreating my development environment until this:

Can't load '/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle, 1): Library not loaded: libmysqlclient.18.dylib Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Reason: image not found at /System/Library/Perl/5.12/darwin-thread-multi-2level/DynaLoader.pm line 204. at /Users/Bruce/Sites/public_html/cgi-bin/ptest.pl line 17 Compilation failed in require at /Users/Bruce/Sites/public_html/cgi-bin/ptest.pl line 17. BEGIN failed--compilation aborted at /Users/Bruce/Sites/public_html/cgi-bin/ptest.pl line 17.

A day of Googling has established that I'm not the first to see an error message like this with Mac OS X, but none of the suggested workarounds worked for me, either because they involve paths and files and things that don't seem (to me) to apply to my computer, or because I don't know what they're talking about.

The MySQL mysql-5.5.19-osx10.6-x86_64 installation appears to be OK; I see what I expect to see with phpMyAdmin.

I did have trouble installing DBD::mysql, but one of the aforementioned workarounds asserted that it was normal to have to force install. Which I did (four times, just to be sure :-). Attempts to reinstall with cpan are dismissed with a message saying everything is up to date.

I'm sure the solution will be obvious to many monks on Macs -- but please keep in mind that nothing about Unix (except its dissimilarity to Windows) is obvious to me.

Thanks so much

Bruce


In reply to Getting DBD-mysql to work with Mac OS X Lion by bmckenzie

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.