[MDEV-20275] Missing libmysqlclient.so(.18) Created: 2019-08-07  Updated: 2019-09-06  Resolved: 2019-09-06

Status: Closed
Project: MariaDB Server
Component/s: Packaging, Platform Debian
Affects Version/s: 10.3.15
Fix Version/s: N/A

Type: Bug Priority: Trivial
Reporter: Bart Grefte Assignee: Otto Kekäläinen
Resolution: Won't Fix Votes: 0
Labels: need_feedback
Environment:

Debian derivative Raspbian 10 (Buster)


Issue Links:
Relates
relates to MDEV-19568 Missing provides (libmysqlclient.so.1... Closed

 Description   

There are programs for Debian derivative Raspbian that are looking for "libmysqlclient.so.18" or "libmysqlclient.so", not "libmariadbclient.so". A simple symlink works around that, but that shouldn't be necessary.

It looks to be the same as MDEV-19568 , just for deb's instead of rpm's.



 Comments   
Comment by Sergei Golubchik [ 2019-09-02 ]

What packages do you have installed? libmysqlclient.so.18 is in the libmysqlclient18 package, not libmariadb3

Comment by Bart Grefte [ 2019-09-03 ]

"What packages do you have installed? libmysqlclient.so.18 is in the libmysqlclient18 package, not libmariadb3"

Raspbian comes with mariadb. As stated in the description, I indicated a symlink from libmariadbclient.so to libmysqlclient.so.18 helps to get around the dependency when it comes to programs that have the filename libmysqlclient.so(.18) hardcoded. From what I have read both are basically the same, except for the version number and filename, that's why this simple workaround seems to work.

Unfortunately that is not enough for a certain program ( http://www.weather-display.com/fileslinux.php , console version for Raspberry Pi), it is looking specifically for version 5.6 of libmysqlclient.so(.18), which I have made the creator aware of.

I've already decided to ditch the (dated) weather station and hook up the sensors directly to the Raspberry Pi, which means I do not depend on that program that is expecting MySQL 5.6.

But that doesn't solve the problem that there are apparently still programs out there that depend on libmysqlclient and not libmariadbclient.

Comment by Sergei Golubchik [ 2019-09-03 ]

I understand, but it does not answer my question. I asked what mariadb/mysql packages do you have installed. Can you run, say,

dpkg -l | grep -i 'maria|mysql'

and paste the output?

Comment by Bart Grefte [ 2019-09-03 ]

Ah, right. Well, that command doesn't show anything. No output, no error, nothing. So I did one search query at a time.

dpkg -l | grep -i mysql
ii dbconfig-mysql 2.0.11 all dbconfig-common MySQL/MariaDB support
ii libdbd-mysql-perl:armhf 4.050-2 armhf Perl5 database interface to the MariaDB/MySQL database
ii mysql-common 5.8+1.0.5 all MySQL database common files, e.g. /etc/mysql/my.cnf
ii php-mysql 2:7.3+69 all MySQL module for PHP [default]
ii php7.1-mysql 7.1.20-1+b2 armhf MySQL module for PHP
ii php7.2-mysql 7.2.9-1+b2 armhf MySQL module for PHP
ii php7.3-mysql 7.3.4-2 armhf MySQL module for PHP
ii phpmyadmin 4:4.6.6-5 all MySQL web administration tool

dpkg -l | grep -i maria
ii dbconfig-mysql 2.0.11 all dbconfig-common MySQL/MariaDB support
ii libdbd-mysql-perl:armhf 4.050-2 armhf Perl5 database interface to the MariaDB/MySQL database
ii libmariadb-dev 1:10.3.15-1 armhf MariaDB database development files
ii libmariadb3:armhf 1:10.3.15-1 armhf MariaDB database client library
ii mariadb-client 1:10.3.15-1 all MariaDB database client (metapackage depending on the latest version)
ii mariadb-client-10.3 1:10.3.15-1 armhf MariaDB database client binaries
ii mariadb-client-core-10.3 1:10.3.15-1 armhf MariaDB database core client binaries
ii mariadb-common 1:10.3.15-1 all MariaDB common metapackage
ii mariadb-server 1:10.3.15-1 all MariaDB database server (metapackage depending on the latest version)
ii mariadb-server-10.3 1:10.3.15-1 armhf MariaDB database server binaries
ii mariadb-server-core-10.3 1:10.3.15-1 armhf MariaDB database core server files

Comment by Sergei Golubchik [ 2019-09-03 ]

First, sorry, grep uses basic RE, so it should've been

grep -i 'maria\|mysql'

Then, yes, this is precisely what I meant. To have libmysqlclient.so.18 you need to have libmysqlclient18 package installed. And you don't have it. This package creates necessary symlinks. And it provides libmysqlclient18 so I don't quite understand how you've got packages that require it without the package that provides it. It looks like you've had broken dependencies on your Raspbian.

What package needed libmysqlclient.so.18? Was it libdbd-mysql-perl? It requires libmysqlclient18 but you don't have it installed. Other packages don't seem to need libmysqlclient at all.

Comment by Bart Grefte [ 2019-09-04 ]

The package libmysqlclient18 does not exist for Debian/Raspbian Buster, only for Sid and Jessie as far as I know: https://packages.debian.org/search?keywords=libmysqlclient18

I also checked with apt to be sure:
sudo apt search libmysqlclient18
Sorting... Done
Full Text Search... Done
(Doesn't show anything beyond this.)

sudo apt search libmysqlclient
Sorting... Done
Full Text Search... Done
default-libmysqlclient-dev/stable 1.0.5 armhf
MySQL database development files (metapackage)

libcrypt-mysql-perl/stable 0.04-6+b4 armhf
Perl module to emulate the MySQL PASSWORD() function

libglpk40/stable 4.65-2 armhf
linear programming kit with integer (MIP) support

"What package needed libmysqlclient.so.18?"
The weather station software I mentioned 2 comments back (specifically http://www.weather-display.com/downloadfiles/consolewd64.tar.gz ), the error comes from there: "Can not load default MySQL library ("libmysqlclient.so.18" or "libmysqlclient.so"). Check your installation."
Not from a specific via apt installed package, as far as I can tell, though I could be wrong.

That error disappeared after manually making the symlink, but got replaced with "TMySQL56Connection can not work with the installed MySQL client version: Expected (5.6), got (10.3.15)."

... and I just remembered getting past that error by unpacking http://security.debian.org/debian-security/pool/updates/main/m/mysql-5.5/libmysqlclient18_5.5.62-0+deb8u1_armhf.deb and putting libmysqlclient.so.18 from that package in the right place, but even then it didn't work. Kept getting an access violation error and a message to check login info, the login info was correct.

That's when I gave up and decided to ditch the weather station software and hook up the sensors directly, without the need for software like that. A simple python script using the mysql command is sufficient, I already have scripts like that running for other sensors, so that shouldn't be difficult.

Comment by Sergei Golubchik [ 2019-09-04 ]

otto, any comments?

Comment by Otto Kekäläinen [ 2019-09-04 ]

Hello!

Which release of Raspbian are you using? Looking at the MariaDB versions I am guessing you are running the Buster based one?
What 3rd party repositories and programs are you running? Are those also targeting Debian/Raspbian Buster?

You are likely in a situation that your system is mixing different binaries built for different systems. If they would be all built on Buster then the run-time dependencies would match what Buster actually has.

If you cannot rebuild the binaries, then you might need to consider running an older version of MariaDB, for example MariaDB 10.1 still shipped libmariadbclient18 (and the compatibility package for libmysqlclient18).

Comment by Bart Grefte [ 2019-09-05 ]

"Which release of Raspbian are you using? Looking at the MariaDB versions I am guessing you are running the Buster based one?"

Buster, which I listed on top at "Environment"

"What 3rd party repositories and programs are you running?"

/etc/apt/sources.list.d/piaware-jessie.list
deb http://flightaware.com/adsb/piaware/files/packages jessie piaware

"Are those also targeting Debian/Raspbian Buster?"

It seems not, but if I replace jessie with buster I get a 404, as far as I know that software doesn't use mysql/mariadb. It's a program that can use a DVB-T like USB receiver to receive ADS-B plain traffic data, there's no storing of data.

"You are likely in a situation that your system is mixing different binaries built for different systems. If they would be all built on Buster then the run-time dependencies would match what Buster actually has."

Could be, but (note, I'm no expert) I think it's as simple as that the maker of the weather station software hardcoded the mysqlclient version it uses, that's where it gets stuck.
Plus, I don't think the program has been build on recent Raspbian versions...

"If you cannot rebuild the binaries, then you might need to consider running an older version of MariaDB, for example MariaDB 10.1 still shipped libmariadbclient18 (and the compatibility package for libmysqlclient18)."

The source for that weather station program doesn't seem to be available. So rebuilding is not an option, otherwise I would've removed the line of code specifically looking for mysqlclient 5.6 myself, that seems to be the main issue, though I never solved the access violation error. Which I am not planning on looking further into, since hooking the weather sensors up directly to my Raspberry Pi is much easier. Especially software wise, just need the mysql-command to process the data.

Comment by Otto Kekäläinen [ 2019-09-06 ]

I downgraded the bug from "critical" to "minor" and I will probably close this as 'wontfix'.

The root cause here is that you are using a 3rd party binary that is also old. It has a built-in dependency for libmysql/mariadbclient18 specifically, and you can solve it by running Debian Stretch on your device and use the MariaDB 10.1 and compat libraries from there (or MySQL 5.5 or 5.6 but not 5.7 or newer).

You can also contact the supplier of that binary and ask for sources so you can re-build it, or ask them to test and release a new version which is built against a newer version of it's dependencies. It does not make much sense for future MariaDB versions to ship old libraries, so this is not something we can or will fix. Newer versions of the library as naturally mostly backwards compatible, but new versions are new, and neither MySQL or MariaDB will ship a library version .18 forever.

Generated at Thu Feb 08 08:58:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.