in reply to Re^2: MAC OS 10.6 upgrade breaks DBD:mysql
in thread dyld: lazy symbol binding failed (was MAC OS 10.6 upgrade breaks DBD:mysql)

I get the same error---except when I run my script as root using sudo. Why should it need, or even want, to run as root? To be more precise,
me% perl -MDBD::mysql -e 'print "hello\n"'
works fine, as does
me% sudo perl
(which connects to a database on another server, ie, not localhost). But
me% perl
produces the error Hagen describes above. Any ideas would be most welcome.

I am running 10.6.1. I ripped out my previous MySQL and DBD::mysql installations, reinstalled MySQL 5.1.38 for x86_64 using the package installer from, and manually installed DBD::mysql 4.012 with Perl Makefile.PL, etc. There were an awful lot of warnings on "make". Perhaps it is relevant that "make test" failed but "sudo make test" succeeded.

The error message from "make test" was to me uninformative. I will copy just the first few lines here:

% make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/00base....................ok 1/6 + # Failed test 'use DBD::mysql;' # at t/00base.t line 21. # Tried to use 'DBD::mysql'. # Error: Can't load '/Users/zteitler/Installers/DBD-mysql-4.012/b +lib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/ +Users/zteitler/Installers/DBD-mysql-4.012/blib/arch/auto/DBD/mysql/my +sql.bundle, 2): Symbol not found: _is_prefix
Any comments or suggestions would be most welcome.

Replies are listed 'Best First'.
Re^4: MAC OS 10.6 upgrade breaks DBD:mysql
by Anonymous Monk on Sep 13, 2009 at 19:31 UTC

    I removed the following:

    /Library/Perl /usr/local/mysql* /Library/Receipts - everything *mysql* /private/var/db/receipts - everything *mysql*
    Then I reinstalled mysql version 5.0, architecture x86 --- ie, 32-bit version, and all my Perl modules including DBD. No problem this time. Perhaps I could have gotten away with removing less stuff, I don't know.

    The following combination seems to be working for me: OSX 10.6.1, perl 5.10, 32-bit mysql version 5.0.51, manually installed DBI and DBD::mysql. Well, it is working at the moment, at least. Interestingly, the 64-bit preferences pane ( seems to work okay with 32-bit mysql.

    I should say that I tried building DBD with the 64-bit versions of mysql 5.0, 5.1, and 5.4, and they all had problems (the problem in the original post). I didn't try with the 32-bit versions of 5.1 or 5.4. Since things seem to be working now---32-bit version of 5.0---I am not messing with it any more. Ever.


Re^4: MAC OS 10.6 upgrade breaks DBD:mysql
by Anonymous Monk on May 17, 2010 at 10:29 UTC

    I had the same problem. I thought I had everything in 64-bit, however in my case I found that I had an environment variable set: VERSIONER_PERL_PREFER_32_BIT=yes.

    Unsetting this variable made Perl run in 64-bit. Root did not use this environment variable, which explains why it worked running with sudo.