2

I'm trying to run Perl DBI on Mac OS and keep hitting into this error:

install_driver(mysql) failed: Can't load '/Library/Perl/5.18/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Library/Perl/5.18/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle, 1): Library not loaded: @rpath/libmysqlclient.21.dylib
Referenced from: /Library/Perl/5.18/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Reason: image not found at /System/Library/Perl/5.18/darwin-thread-multi-2level/DynaLoader.pm line 194.
at (eval 4) line 3.
Compilation failed in require at (eval 4) line 3.
Perhaps a required shared library or dll isn't installed where expected at test.pl line 12.

I've already tried to use perlbrew, ActivePerl, symlinks, but no luck.

Fixed: for some reason DBI/DBD won't work with latest MySQL (8+) on mac. Downgrading to version 5 solves this problem.

1
  • Do you have the MySQL libraries installed? I'm thinking the dev libraries. Not the Perl module, but the from-MySQL dev libraries? Commented Sep 9, 2018 at 0:23

1 Answer 1

1

Fixed: for some reason DBI/DBD won't work with latest MySQL (8+) on mac. Downgrading to version 5 solves this problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.