Discussion:
[Lazarus] error code "Can't load default MySQL library("libmysqlclient.so.20" or "libmysqlclient.so"). Check your installation.
Larry Dalton via Lazarus
2018-05-25 03:08:16 UTC
Permalink
My application was compiled on lazarus 1.8.2, along with mysql 5.7, running
on linux 17.2. I have verified that both libmysqlclient.so and
libmysqlclient.so.20 are in the unit directory that holds the executable
program. I still get the above error when trying to access the mysql
database.
Michael Van Canneyt via Lazarus
2018-05-25 05:35:36 UTC
Permalink
Post by Larry Dalton via Lazarus
My application was compiled on lazarus 1.8.2, along with mysql 5.7, running
on linux 17.2. I have verified that both libmysqlclient.so and
libmysqlclient.so.20 are in the unit directory that holds the executable
program. I still get the above error when trying to access the mysql
database.
It must not be in the program directory. By default, the linux loader does
not search in the program directory, that only happens on Windows.

Normally, the mysql library is in the /usr/lib/* directory. That is where
the loader will look for it.

Did you install the mysql-dev package ? In that case, there should be a
symlink libmysqlclient.so to libmysqlclient.so.20 in /usr/lib/ and the
program should start.

Michael.
--
Julius via Lazarus
2018-05-25 06:24:05 UTC
Permalink
Post by Larry Dalton via Lazarus
My application was compiled on lazarus 1.8.2, along with mysql 5.7,
running on linux 17.2. I have verified that both libmysqlclient.so and
libmysqlclient.so.20 are in the unit directory that holds the executable
program. I still get the above error when trying to access the mysql
database.
Hi,

here is what I use and it works. They, I believe, always keep these
files pointing to the correct locations:


cSqliteDefaultLibraryLocation64 =
'/usr/lib/x86_64-linux-gnu/libsqlite3.so.0';
cSqliteDefaultLibraryLocation32 =
'/usr/lib/i386-linux-gnu/libsqlite3.so.0';
--
Julius
--
Julius via Lazarus
2018-05-25 06:24:59 UTC
Permalink
Post by Larry Dalton via Lazarus
My application was compiled on lazarus 1.8.2, along with mysql 5.7,
running on linux 17.2. I have verified that both libmysqlclient.so and
libmysqlclient.so.20 are in the unit directory that holds the executable
program. I still get the above error when trying to access the mysql
database.
Sorry, I realized as I hit send you wanted mysql. Excuse me.
--
Julius
--
Loading...