in reply to DBD::mysql on MacOS Ventura (AArch64)

I'm getting all kinds of errors installing the module

Then why don't you post the error messages?

Just a guess: you may need to install the MySQL client libraries.

If you can't get DBD::mysql running, try DBD::MariaDB. It should be fully compatible, and is said to have less bugs and legacy problems.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re: DBD::mysql on MacOS Ventura (AArch64)

Replies are listed 'Best First'.
Re^2: DBD::mysql on MacOS Ventura (AArch64)
by lschult2 (Novice) on Apr 06, 2023 at 02:19 UTC
    Found the issue. There was a bug that the latest version of ExtUtils::MakeMaker fixed. Solution was to install the latest version of ExtUtils::MakeMaker rather than the default that came with Ventura. Bug is documented here: https://github.com/perl5-dbi/DBD-mysql/issues/337
Re^2: DBD::mysql on MacOS Ventura (AArch64)
by lschult2 (Novice) on Apr 06, 2023 at 00:17 UTC
    There were lots of warnings that threw me off, but I suspect they can all be ignored. I think this here is the key error:
    # Failed test 'use DBD::mysql;' # at t/00base.t line 15. # Tried to use 'DBD::mysql'. # Error: Can't load '/private/var/root/.cpan/build/DBD-mysql-4.05 +0-8/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlo +pen(/private/var/root/.cpan/build/DBD-mysql-4.050-8/blib/arch/auto/DB +D/mysql/mysql.bundle, 0x0002): Library not loaded: @rpath/libmysqlcli +ent.21.dylib # Referenced from: <7D546A82-F230-3186-ADBB-6393EF2F59D5> /private/v +ar/root/.cpan/build/DBD-mysql-4.050-8/blib/arch/auto/DBD/mysql/mysql. +bundle # Reason: tried: '/System/Volumes/Preboot/Cryptexes/OS@rpath/libmysq +lclient.21.dylib' (no such file), '/usr/lib/libmysqlclient.21.dylib' +(no such file, not in dyld cache), (security policy does not allow @ +path expansion) at /System/Library/Perl/5.30/darwin-thread-multi-2lev +el/DynaLoader.pm line 197. # at t/00base.t line 15.
    So it does appear to be library related. On Ventura, /usr/lib is read-only. It's not looking for the dylib at /usr/local/mysql/lib, even though that is the path in mysql_config.
    I will use the following settings for compiling and testing: cflags (mysql_config) = -I/usr/local/mysql/include embedded (guessed ) = ldflags (guessed ) = libs (mysql_config) = -L/usr/local/mysql/lib -lmysqlclient +-lssl -lcrypto -lresolv mysql_config (guessed ) = mysql_config nocatchstderr (default ) = 0 nofoundrows (default ) = 0 nossl (default ) = 0 testdb (default ) = test testhost (default ) = testpassword (default ) = testport (default ) = testsocket (default ) = testuser (guessed ) = len