MariaDB + Debian

For MariaDB fans there are some changes coming in the current Debian testing/unstable, which will hit mainstream sometime this year (I guess).
A lot of things compiled against libmariadbclient.so.18 will start failing, most of which can be solved with a simple symlink except a few…

Opendmarc wil fail to compile:
opendkim: malloc.c:3757: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.

Spamassassin will fail to run
spamd[27186]: at /usr/share/perl5/Mail/SpamAssassin/Conf/SQL.pm line 138.
spamd[27186]: spamd: service unavailable: Error fetching user preferences via SQL
spamd[3690]: config: failed to load user (dmarc@black-mail.nl) scores from SQL database: install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
spamd[3690]: Compilation failed in require at (eval 1409) line 3, line 2.

The opendkim one is pretty vague and seemingly unhelpfull but a bit of digging will reveal the following:
Can't load '/usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.so' for module DBD::mysql: /usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.so: symbol mysql_options4, version libmariadbclient_18 not defined in file libmariadbclient.so.18 with link time reference at /usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187.
at /usr/sbin/opendmarc-import line 22.
Compilation failed in require at /usr/sbin/opendmarc-import line 22.

Hey, now we have a finger to point, Perl::DBD:
ldd /usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.so
/usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.so: /lib/libmariadbclient.so.18: no version information available (required by /usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.so)
linux-vdso.so.1 (0x00007ffdca9bc000)
libmariadbclient.so.18 => /lib/libmariadbclient.so.18 (0x00007faf4fe63000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faf4fac5000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007faf4f8ab000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faf4f68e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007faf4f48a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faf4f184000)
libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007faf4ef18000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007faf4ea85000)
/lib64/ld-linux-x86-64.so.2 (0x000056045c708000)

For some reason no symlinking will solve this, but no worries, simply get the source, unpack it and run:
perl Makefile.PL
make
make install
make clean

After this things should work smoothly, but keep in mind to keep the package up date date and remove the manually installed files should Debian fix this.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

2 thoughts on “MariaDB + Debian

  1. HeHey there!

    I tried to use amavis with DBD and mariadb and I get :

    Sep 22 10:07:20 mail.ack.email amavis[1028]: Can’t load ‘/usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.s
    o’ for module DBD::mysql: libmariadbclient.so.18: cannot open shared object file: No such file or directory at /usr/li
    b/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187.

    I dont quite understand what I should do. Can you give me a hint? 😛

    Thanks buddy!!

    Cheers

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.