Recent

Author Topic: Cannot load default MySQL library  (Read 13243 times)

mrj2

  • New Member
  • *
  • Posts: 10
Cannot load default MySQL library
« on: October 31, 2011, 09:51:46 pm »
Hi All

I have only been using Lazarus for a couple of days and very impressed with what I see. 

I am using Lazarus version 0.9.28.2 on Ubuntu

I seem to have a problem in that the so library files for MySQL and SQLite are not found by Lazarus.  Having a look in the /usr/lib folder, I see that I don't have the versions Lazarus is expecting. 

MySQL requires libmysqlclient.so.15 or libmysqlclient.so  I have libmysqlclient.so.16 and libmysqlclient.so.r.16

SQLite requires libsqlite3.so  I have libsqlite3.so.0

I seem to think there might be other issues once I start to use other libraries in the same folder.

Is there a work around for this?  Or could someone point me in the direction to sort this out.

Thanks

Michael

IndianaJones

  • Hero Member
  • *****
  • Posts: 509
Re: Cannot load default MySQL library
« Reply #1 on: November 01, 2011, 09:06:42 am »

You can create symbolic link for the libmysqlclient.so and libsqlite.3.so with ln -s command in the /usr/lib directory.

mrj2

  • New Member
  • *
  • Posts: 10
Re: Cannot load default MySQL library
« Reply #2 on: November 01, 2011, 06:31:18 pm »
Does this mean I could create a link with an different name and it would work? 

Where would I put the symbolic link? In the same folder?

IndianaJones

  • Hero Member
  • *****
  • Posts: 509
Re: Cannot load default MySQL library
« Reply #3 on: November 01, 2011, 08:00:42 pm »
Yes exactly, in the same directory '/usr/lib'. If you need to look at the format of the "ln" command, do 'man ln' on the command prompt.
ln -s libmysqlclient.so.16 libmysqlclient.so
« Last Edit: November 01, 2011, 08:12:14 pm by IndianaJones »

mrj2

  • New Member
  • *
  • Posts: 10
Re: Cannot load default MySQL library
« Reply #4 on: November 01, 2011, 08:19:21 pm »
Thanks!   It did the job for SQLite.

I think I will read other messages regarding MySQL.  I seem to think this is more involved.



mdalacu

  • Full Member
  • ***
  • Posts: 238
    • dmSimpleApps
Re: Cannot load default MySQL library
« Reply #5 on: November 01, 2011, 08:39:57 pm »
Is your database 5.1 or 5. Lazarus has components only for 5. You should copy a mysql library from 5 version.

IndianaJones

  • Hero Member
  • *****
  • Posts: 509
Re: Cannot load default MySQL library
« Reply #6 on: November 01, 2011, 09:44:54 pm »

if you dont need client-server architecture sqlite3 is enough to create robust database, as mdalacu said you have to install mysql5 (not 5.1) package to work with Lazarus MySQL components.
or you can also try zeos components as well.


 

TinyPortal © 2005-2018