1

For years, I'm running a perl script on my Synology NAS. This script writes to a MariaDB database. I never had any errors. Until the migration to DSM7. This is what happened ...

  1. I never had any problem when using MariaDB5
  2. I migrated my database from MariaDB5 to MariaDB10. I changed the database name and the credentials to make sure my perl script used the MariaDB10 database. Everything worked fine!
  3. I upgraded my Synology NAS to DSM7, following the provided procedure, including the requirement to remove the MariaDB5 package.

Afterwards, I noticed I following error: Can't load '/usr/local/lib/perl5/vendor_perl/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmariadb.so.3: cannot open shared object file: No such file or directory at /usr/local/lib/perl5/core_perl/DynaLoader.pm line 193. at ./mysql1_MDB10.pl line 2. Compilation failed in require at ./mysql1_MDB10.pl line 2. BEGIN failed--compilation aborted at ./mysql1_MDB10.pl line 2.

To make it easy to debug, I created a test script:

#!/usr/bin/perl
use DBD::mysql;
$solDBIDB = 'DBI:mysql:database=SOLAR2_10;host=127.0.0.1;port=3307';
$DBUser   = 'mydbuser';
$DBPass   = 'mydbpass';
$dbh = DBI->connect($solDBIDB, $DBUser, $DBPass) || die "Could not connect to database: $DBI::errstr";
$query = "SELECT * FROM SOLAR2_10.SUM_DATA_ITEMS";
$query_handle = $dbh->prepare($query); 
# EXECUTE THE QUERY
$query_handle->execute();

I'm using a Synology NAS DS415P with DSM DSM 7.1-42661 Update 2 (latest updates)

Perl is installed as a package (via the Synology Package center)

perl -v provides the following version information: This is perl 5, version 28, subversion 3 (v5.28.3) built for i686-linux

The version of MariaDB10 is 10.3.32-1040

Update after comment @ikegami

I'm able to find the mysql.so file:

-r-xr-xr-x 1 root root 131923 Apr 21  2021 /usr/local/lib/perl5/vendor_perl/auto/DBD/mysql/mysql.so

I'm able to find the various libmariadb.so files: ls -l in /volume1/@appstore/MariaDB10/usr/local/mariadb10/lib

lrwxrwxrwx 1 root root       15 Nov 23  2021 libmariadb.so -> libmariadb.so.3
-rwxr-xr-x 1 root root   275356 Nov 23  2021 libmariadb.so.3
lrwxrwxrwx 1 root root       15 Nov 23  2021 libmysqlclient_r.so -> libmariadb.so.3
lrwxrwxrwx 1 root root       15 Nov 23  2021 libmysqlclient.so -> libmariadb.so.3
lrwxrwxrwx 1 root root       17 Nov 23  2021 libmysqld.so -> libmariadbd.so.19
drwxr-xr-x 3 root root     4096 Nov 23  2021 mysql
drwxr-xr-x 2 root root     4096 Nov 23  2021 pkgconfig

Additional info:

cpan -l | egrep -i "mysql"
Bundle::DBD::mysql  4.048
DBD::mysql  4.048
DBD::mysql::GetInfo undef

To me, everything looks properly installed ... What am I missing?

  • 2
    Try reinstalling DBD::mysql. In all your changes, `libmariadb.so.3` was apparently replaced, so you need to rebuild DBD::mysql so it can link against the replacement. – ikegami Jun 25 '22 at 18:54
  • @ikegami Thanks for your reply but I'm still trying to figure out how to solve this. I updated my question with additional information as it was too long for a comment. – Willem D'Hondt Jun 30 '22 at 15:54

0 Answers0