Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-05

error code "Can't load default MySQL library("libmysqlclient.so.20" or "libmysqlclient.so"). Check your installation.

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Larry Dalton

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180524/063f8759/attachment.html>

Reply by email

Michael Van Canneyt
to Larry Dalton
Larry Dalton wrote 5 lines
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.

Reply by email

Julius
to Larry Dalton: My application was compiled on lazarus 1.8.2, along with mysql 5.7, running on linux…
Larry Dalton wrote 7 lines
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

Reply by email

Julius
to Larry Dalton: My application was compiled on lazarus 1.8.2, along with mysql 5.7, running on linux…
Larry Dalton wrote 7 lines
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

Reply by email