Recent

Author Topic: Can't load Sqlite client library "libsqlite3.so".Check your installation-Ubuntu  (Read 16840 times)

Goodman H__

  • Full Member
  • ***
  • Posts: 130
I got the subjected error message under Ubuntu 10 when I test sqlite3 DB connection.What does this mean,how can I fixed?I checked the system do have libsqlite3.so installed under \use\lib.Below is what I did :

In the form I placed a sqlite3connection,in the property field databaseName I entered mydb.db3 which is in the same folder with the project.Now I tried to change active to true,I got the error message.

It would be grateful if anybody can help.

Regrds,
Sam
fpc:2.6.1 Lazarus:1.1 SVN39277
OS:win 7

stonefull

  • Jr. Member
  • **
  • Posts: 51
Try

sudo apt-get install libsqlite3-dev

devEric69

  • Full Member
  • ***
  • Posts: 123
Try copying your library libsqlite3.so, into /usr/lib (executables search for libraries in a set of places, e.g. /lib, /usr/lib, /usr/local/lib,... so if you do not put your .so file in one of these places like /usr/local/lib, it might be a good place).
« Last Edit: March 19, 2019, 02:05:43 pm by devEric69 »
use: Ubuntu 18.04 + Laz. 1.8.5 + FPC 3.0.5 (64 bits).

Thaddy

  • Hero Member
  • *****
  • Posts: 8688
Try copying your library libsqlite3.so, into /usr/lib (executables search for libraries in a set of places, e.g. /lib, /usr/lib, /usr/local/lib,... so if you do not put your .so file in one of these places like /usr/local/lib, it might be a good place).
That's probably worse, since sqlite is already present on most systems (except the headers).

Try this first and report back:
Code: Bash  [Select]
  1. cd /
  2. sudo find -name libsqlite3.so*
  3.  
That wil give you something like this:
Code: Text  [Select]
  1.  sudo find -name libsqlite3.so.*
  2. ./usr/lib/arm-linux-gnueabihf/libsqlite3.so.0.8.6
  3. ./usr/lib/arm-linux-gnueabihf/libsqlite3.so.0
  4.  
Now just make a symlink to one of the last two that is called
Code: Bash  [Select]
  1. libsqlite3.so
  2. # like
  3. /usr/local/lib/libsqlite3.so
  4. # or
  5.  /usr/lib/libsqlite3.so
  6. #  (better to do the first one)
The reason is that there are multiple versions and none of them are symlinked to the proper - default - name.
« Last Edit: March 19, 2019, 03:08:53 pm by Thaddy »
Most people that want to use threading should learn to patch their jeans first: use a needle.

devEric69

  • Full Member
  • ***
  • Posts: 123
Thank you for responding.
To make sure I understand, I just have to make a link like this:

                                      ↙--------------------------------------------↖
ln    -sf    /usr/lib/arm-linux-gnueabihf/libsqlite3.so.0    /usr/lib/libsqlite3.so

( Besides: one thing that bothered me and that I didn't understand, that's why the symlink called libsqlite3.so.*0*. Why libsqlite3.so.0 instead of just libsqlite3.so? I found the explanation in this page (http://wiki.freepascal.org/SQLite/fr), paragraph "§ Cas de Debian Jessie": "[SNIP] Debian Jessie only offers the symbolic link libsqlite3.so.0. [/SNIP]" ==> from this historical limitation, the symlink is named libsqlite3.so.0 )
« Last Edit: March 22, 2019, 01:32:30 pm by devEric69 »
use: Ubuntu 18.04 + Laz. 1.8.5 + FPC 3.0.5 (64 bits).

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7363
Thank you for responding.
To make sure I understand, I just have to make a link like this:

                                      ↙--------------------------------------------↖
ln    -sf    /usr/lib/arm-linux-gnueabihf/libsqlite3.so.0    /usr/lib/libsqlite3.so

Yes. Stonefull's suggestion to install the -dev package should also work.

The sqlite3.so is the development target, the .so.0 the runtime target.