3

I have a program I'm trying to get running on an Ubuntu machine (I've previously run it only on CentOS), and when executing it I get:

error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory

If I do "locate libmysqlclient.so", I get only:

/usr/lib/x86_64-linux-gnu/libmysqlclient.so.18
/usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0

I've tried:

apt-get install libmysqlclient-dev

But this did not solve the problem, and I still don't appear to have libmysqlclient.so.16.

I also found a forum post somewhere where someone apparently solved this by installing the rpm MySQL-shared-compat-5.1.49-1.rhel5.x86_64.rpm, so I tried this but with no change in the result.

I don't know if this is relevant, but the program I'm trying to execute is 32-bit, and I gather my system doesn't have 32-bit support, so initially I was getting "no such file or directory", until I followed the advice on this page: No such file or directory? But the file exists!.

Any help would be very much appreciated. Thanks.

  • What application is it? Did you compile it from sources? Just copying binaries from a different distro mostly won't work as they are using different sets of libraries and the mysql library might be only one issue you will experience. – Thomas Feb 17 '18 at 07:48
  • Difficult to say without information on the software you are using but you could try to copy the file from your CentOS to Ubuntu. You could also try also to fool the system by copying the .18 to 16. This is clearly not a safe option, though. – Marc Vanhoomissen Feb 19 '18 at 13:36
  • It's a locally written program. Yes, I compiled it from source. – Steven Linden Feb 20 '18 at 13:57

0 Answers0