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 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/ line 138.
spamd[27186]: spamd: service unavailable: Error fetching user preferences via SQL
spamd[3690]: config: failed to load user ( scores from SQL database: install_driver(mysql) failed: Attempt to reload DBD/ 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/' for module DBD::mysql: /usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/ symbol mysql_options4, version libmariadbclient_18 not defined in file with link time reference at /usr/lib/x86_64-linux-gnu/perl/5.24/ 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/
/usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/ /lib/ no version information available (required by /usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/ (0x00007ffdca9bc000) => /lib/ (0x00007faf4fe63000) => /lib/x86_64-linux-gnu/ (0x00007faf4fac5000) => /lib/x86_64-linux-gnu/ (0x00007faf4f8ab000) => /lib/x86_64-linux-gnu/ (0x00007faf4f68e000) => /lib/x86_64-linux-gnu/ (0x00007faf4f48a000) => /lib/x86_64-linux-gnu/ (0x00007faf4f184000) => /usr/lib/x86_64-linux-gnu/ (0x00007faf4ef18000) => /usr/lib/x86_64-linux-gnu/ (0x00007faf4ea85000)
/lib64/ (0x000056045c708000)

For some reason no symlinking will solve this, but no worries, simply get the source, unpack it and run:
perl Makefile.PL
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.


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 amavis[1028]: Can’t load ‘/usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.s
    o’ for module DBD::mysql: cannot open shared object file: No such file or directory at /usr/li
    b/x86_64-linux-gnu/perl/5.24/ line 187.

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

    Thanks buddy!!


Leave a Reply

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