Recent

Author Topic: Ubuntu, SQLtte3 library problem  (Read 2898 times)

HappyLarry

  • Full Member
  • ***
  • Posts: 155
Ubuntu, SQLtte3 library problem
« on: August 15, 2016, 11:06:52 am »
I am trying to connect Lazarus to SQLite3 using Ubuntu 16.04. SQLite3 has been installed and works correctly in Ubuntu. The database .db file is in the application directory. I have dropped a SQLIte3 connection component onto the form and set the database name.

However I get the error
 Can not load libsqlite3.so Check your installation.

Can someone explain simply, how to help Lazarus find this library. The library appears to be in ./usr/lib and is called libsqlite3.so.0
Use Lazarus and Free Pascal and stand on the shoulders of giants . . . very generous giants. Thank you.

Thaddy

  • Hero Member
  • *****
  • Posts: 14382
  • Sensorship about opinions does not belong here.
Re: Ubuntu, SQLtte3 library problem
« Reply #1 on: August 15, 2016, 12:02:33 pm »
sudo apt-get install libsqlite3-dev

You are missing the development library.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

HappyLarry

  • Full Member
  • ***
  • Posts: 155
Re: Ubuntu, SQLtte3 library problem
« Reply #2 on: August 15, 2016, 12:17:57 pm »
Thanks, that solved the problem.

As a matter of interest I got the error message
Quote
Package libsqlite3-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

I got it form https://launchpad.net/ubuntu/xenial/i386/libsqlite3-dev/3.11.0-1ubuntu1 instead

Use Lazarus and Free Pascal and stand on the shoulders of giants . . . very generous giants. Thank you.

Thaddy

  • Hero Member
  • *****
  • Posts: 14382
  • Sensorship about opinions does not belong here.
Re: Ubuntu, SQLtte3 library problem
« Reply #3 on: August 15, 2016, 12:37:15 pm »
In that case you could have used "sudo apt-get install -f" which would have tried to resolve the dependency.

Glad it works now ;) Remember: check if the dev libraries are installed for your requirements. Often they are not, like in this case.

Oh, and libsqlite3-dev is most certainly available from the UBUNTU repository!  I just tried...
« Last Edit: August 15, 2016, 12:40:13 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018