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.

Yehor Levchenko
  • 56
  • 1
  • 2
  • 10
  • Do you have the MySQL libraries installed? I'm thinking the dev libraries. Not the Perl module, but the from-MySQL dev libraries? – Dave Jacoby Sep 09 '18 at 00:23

1 Answers1

1

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

Yehor Levchenko
  • 56
  • 1
  • 2
  • 10