Skip to content

Instantly share code, notes, and snippets.

@jhannah
Created September 21, 2012 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhannah/3763659 to your computer and use it in GitHub Desktop.
Save jhannah/3763659 to your computer and use it in GitHub Desktop.
DBD::mysql on OSX
jhannah@Jay-Hannahs-iMac:~/src/DBD-mysql-4.022$ perl -MDBD::mysql -e 1
Can't load '/Users/jhannah/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/jhannah/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/auto/DBD/mysql/mysql.bundle, 1): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Users/jhannah/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/auto/DBD/mysql/mysql.bundle
Reason: image not found at /Users/jhannah/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/darwin-2level/DynaLoader.pm line 194.
at -e line 0.
Compilation failed in require.
BEGIN failed--compilation aborted.
@jhannah
Copy link
Author

jhannah commented Sep 21, 2012

Huh. Fixed.
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib

@jhannah
Copy link
Author

jhannah commented Sep 21, 2012

Ha. So now this is back

$ ps -ef | grep perl
dyld: DYLD_ environment variables being ignored because main executable (/bin/ps) is setuid or setgid
501  9473  1158   0  5:17PM ttys003    0:00.00 grep perl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment