libmysqlclient.so.18 missing after update from Leap 42.3

I have compiled Bacula from source in 2016. Since then I have updated openSUSE more than once but never had this problem.

Last night I updated to Leap 15. Now my bacula-dir.service won’t start:


# systemctl status bacula-dir.service
● bacula-dir.service - LSB: bacula director
   Loaded: loaded (/etc/init.d/bacula-dir; generated; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2018-07-23 13:19:17 EEST; 58min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2548 ExecStart=/etc/init.d/bacula-dir start (code=exited, status=7)

Jul 23 13:19:17 pc systemd[1]: Starting LSB: bacula director...
Jul 23 13:19:17 pc bacula-dir[2548]: Starting the Bacula Director: /usr/sbin/bacula-dir: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
Jul 23 13:19:17 pc startproc[2556]: startproc:  exit status of parent of /usr/sbin/bacula-dir: 127
Jul 23 13:19:17 pc bacula-dir[2548]: ..done
Jul 23 13:19:17 pc systemd[1]: bacula-dir.service: Control process exited, code=exited status=7
Jul 23 13:19:17 pc systemd[1]: Failed to start LSB: bacula director.
Jul 23 13:19:17 pc systemd[1]: bacula-dir.service: Unit entered failed state.
Jul 23 13:19:17 pc systemd[1]: bacula-dir.service: Failed with result 'exit-code'.

# zypper search libmysqlclient
Loading repository data...
Reading installed packages...
No matching items found.

Yet the update installed all kinds of packages I don’t need without me asking for it (e.g. youtube-dl, kmail and others which I had previously uninstalled). Very annoying.

What should I do?

On this Leap 15.0 machine ‘/usr/lib64/libmysqlclient.so’ is present:


 > file /usr/lib64/libmysqlclient.so
/usr/lib64/libmysqlclient.so: symbolic link to libmariadb.so
 > l /usr/lib64/libmysqlclient.so
lrwxrwxrwx 1 root root 13 12. Mai 10:56 /usr/lib64/libmysqlclient.so -> libmariadb.so*
 > rpm --query --whatprovides /usr/lib64/libmariadb.so
libmariadb-devel-3.0.3-lp150.1.2.x86_64
 > rpm --query --whatprovides /usr/lib64/libmysqlclient.so
libmariadb-devel-3.0.3-lp150.1.2.x86_64
 > zypper info libmariadb3 libmariadb-devel
Loading repository data...
Reading installed packages...


Information for package libmariadb3:
------------------------------------
Repository     : Haupt-Repository (OSS)
Name           : libmariadb3
Version        : 3.0.3-lp150.1.2
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 342.7 KiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : mariadb-connector-c-3.0.3-lp150.1.2.src
Summary        : MariaDB connector in C
Description    :
    MariaDB Connector is used to connect applications developed in
    C or C++ to MariaDB and MySQL databases.

    This package holds the runtime components.


Information for package libmariadb-devel:
-----------------------------------------
Repository     : Haupt-Repository (OSS)
Name           : libmariadb-devel
Version        : 3.0.3-lp150.1.2
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 168.1 KiB
Installed      : Yes
Status         : up-to-date
Source package : mariadb-connector-c-3.0.3-lp150.1.2.src
Summary        : Development files for the MariaDB Connector C API
Description    :
    MariaDB Connector is used to connect applications developed in
    C or C++ to MariaDB and MySQL databases.

    This package holds the development files.

 > 

Error is not about libmysqlclient.so but about libmysqlclient.so.18. It is quite possible that package providing it had been removed by “zypper dup”. In which case OP needs to update bacula to version built for Leap 15.

Thanks! :shame: Found the correct answer here (openSUSE Software servers currently seem to be experiencing some issues … ): <https://pkgs.org/download/libmysqlclient.so.18&gt;
“libmysqlclient.so.18” is provided by the Package “libmariadb3-32bit”:


 > zypper info --provides libmariadb3-32bit
Loading repository data...
Reading installed packages...


Information for package libmariadb3-32bit:
------------------------------------------
Repository     : Haupt-Repository (OSS)
Name           : libmariadb3-32bit
Version        : 3.0.3-lp150.1.2
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 277.0 KiB
Installed      : No
Status         : not installed
Source package : mariadb-connector-c-3.0.3-lp150.1.2.src
Summary        : MariaDB connector in C
Description    :
    MariaDB Connector is used to connect applications developed in
    C or C++ to MariaDB and MySQL databases.

    This package holds the runtime components.
Provides       : [8]
    libmariadb.so.3
    libmariadb.so.3(libmysqlclient_18)
    libmariadb.so.3(libmariadb_3)
    libmariadb.so.3(libmariadbclient_18)
    libmysqlclient.so.18
    libmysqlclient.so.18(libmysqlclient_18)
    libmariadb3-32bit = 3.0.3-lp150.1.2
    libmariadb3-32bit(x86-32) = 3.0.3-lp150.1.2

 > 

You are using some external repo.
It has been confirmed in a bug report that libmysqlclient has been removed in Leap 15 because “leap 15 is a major version and as such libraries disappear”. I have no idea what this is supposed to mean - that major version breaks essential things but at the same time installs others without being asked to (e.g. youtube-dl, kmail and others which I had to remove after the update). Sounds like a big mess to me.

Also in the bug report it was suggested “You can either recompile from source, install libmysqlclient18 from Leap 42.3 or do what most admins do nowadays in this case: create a container for your self compiled app.” I have no idea what the later means but perhaps I will do what arvidjaar suggest.

BTW here:


~]: zypper info --provides libmariadb-devel                                                                      
Loading repository data...                                                                                        
Reading installed packages...                                                                                     
                                                                                                                  
                                                                                                                  
Information for package libmariadb-devel:                                                                         
-----------------------------------------                                                                         
Repository     : *Main (OSS)                                                                                      
Name           : libmariadb-devel                                                                                 
Version        : 3.0.3-lp150.1.2                                                                                  
Arch           : x86_64                                                                                           
Vendor         : openSUSE                                                                                         
Installed Size : 168.1 KiB                                                                                        
Installed      : Yes                                                                                              
Status         : up-to-date                                                                                       
Source package : mariadb-connector-c-3.0.3-lp150.1.2.src                                                          
Summary        : Development files for the MariaDB Connector C API
Description    :                                                  
    MariaDB Connector is used to connect applications developed in
    C or C++ to MariaDB and MySQL databases.

    This package holds the development files.
Provides       : [5]                                              
    libmariadb-devel = 3.0.3-lp150.1.2
    libmariadb-devel(x86-64) = 3.0.3-lp150.1.2
    libmysqlclient-devel = 10.2.10
    libmysqlclient_r18 = 10.2.10
    mysql-devel = 10.2.10

Does that “_r18” suggest that it is the one I need?

Success:


# ln -s libmysqlclient.so libmysqlclient.so.18
# systemctl start bacula-dir.service
# systemctl status bacula-dir.service
● bacula-dir.service - LSB: bacula director
   Loaded: loaded (/etc/init.d/bacula-dir; generated; vendor preset: disabled)
   Active: active (running) since Mon 2018-07-23 18:28:37 EEST; 4s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6239 ExecStart=/etc/init.d/bacula-dir start (code=exited, status=0/SUCCESS)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/bacula-dir.service
           └─6247 /usr/sbin/bacula-dir -c /etc/bacula/bacula-dir.conf

Jul 23 18:28:37 pc systemd[1]: Starting LSB: bacula director...
Jul 23 18:28:37 pc bacula-dir[6239]: Starting the Bacula Director: ..done
Jul 23 18:28:37 pc systemd[1]: Started LSB: bacula director.

:slight_smile:

I think, your Problem is bacula, try to compile it once more with newer source…

No, it is not. Bacula worked fine since openSUSE 13.1 and survived all OS updates so far.
It also works now (after creating the symbolic link).
The problem seems to be how Leap 15 handles that particular library. (feel free to show facts which prove me wrong, I am just following what I observe so far)

That doesn’t mean I will not compile a newer bacula, just saying.

libmysqlclient.so.18 is not part of Leap 15.0.

I suspect not:


 > l '/usr/lib64/libmysqlclient.so'
lrwxrwxrwx 1 root root 13 12. Mai 10:56 /usr/lib64/libmysqlclient.so -> libmariadb.so*
 > rpm --query --whatprovides /usr/lib64/libmysqlclient.so
libmariadb-devel-3.0.3-lp150.1.2.x86_64
 > zypper info libmariadb-devel
Loading repository data...
Reading installed packages...


Information for package libmariadb-devel:
-----------------------------------------
Repository     : Haupt-Repository (OSS)
Name           : libmariadb-devel
Version        : 3.0.3-lp150.1.2
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 168.1 KiB
Installed      : Yes
Status         : up-to-date
Source package : mariadb-connector-c-3.0.3-lp150.1.2.src
Summary        : Development files for the MariaDB Connector C API
Description    :
    MariaDB Connector is used to connect applications developed in
    C or C++ to MariaDB and MySQL databases.

    This package holds the development files.

 > 


 > rpm --query --scripts libmariadb-devel
 > rpm -ql libmariadb-devel
/usr/bin/mariadb_config
/usr/bin/mysql_config
/usr/include/mysql
/usr/include/mysql/errmsg.h
/usr/include/mysql/ma_list.h
/usr/include/mysql/ma_pvio.h
/usr/include/mysql/ma_tls.h
/usr/include/mysql/mariadb
/usr/include/mysql/mariadb/ma_io.h
/usr/include/mysql/mariadb_com.h
/usr/include/mysql/mariadb_ctype.h
/usr/include/mysql/mariadb_dyncol.h
/usr/include/mysql/mariadb_stmt.h
/usr/include/mysql/mariadb_version.h
/usr/include/mysql/my_config.h
/usr/include/mysql/mysql
/usr/include/mysql/mysql.h
/usr/include/mysql/mysql/client_plugin.h
/usr/include/mysql/mysql/plugin_auth.h
/usr/include/mysql/mysql/plugin_auth_common.h
/usr/include/mysql/mysql_version.h
/usr/include/mysql/mysqld_error.h
/usr/lib64/libmariadb.so
/usr/lib64/libmysqlclient.so
/usr/lib64/libmysqlclient_r.so
 > 

Downloading the “libmariadb-devel” package and checking it’s contents with Ark indicated that, the three ‘/usr/lib64/’ files are symbolic links …

You are right.
Unfortunately I am facing issues when trying to recompile too. So I think it would be best to discuss those in another thread.