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.