SQLite Forum

libreadline problem with Ubuntu 20.04
Login

libreadline problem with Ubuntu 20.04

(1) By Holger J (holgerj) on 2020-11-19 13:44:41 [link]

The SQLite binary 3.31 for Linux seems not to recognise the libreadline libraries available on Ubuntu 20.04

  $ apt-cache search libreadline
  libreadline5 - GNU readline and history libraries, run-time libraries
  libreadline8 - GNU readline and history libraries, run-time libraries

I had to copy libreadline.so.7 from an 18.04 machine in order to get the readline functionality again.

(2) By Warren Young (wyoung) on 2020-11-20 11:40:01 in reply to 1 [link]

That simply means the binary was built on Ubuntu 18.04 or something roughly contemporaneous with it. If you want a binary that links to libraries on your system, you'll have to build it yourself.

…Unless, that is, you're expecting us to build separate binaries for each major Linux flavor?

(3) By Holger J (holgerj) on 2020-12-04 10:30:10 in reply to 2 [link]

I expect the binary to have been linked against libraries available in major flavors of Linux.

This has been the case for many years, and I cannot find a reason to deviate from this policy.

(4.1) By Adrian Ho (lexfiend) on 2020-12-07 10:19:15 edited from 4.0 in reply to 3

> I expect the binary to have been linked against libraries available in major flavors of Linux.

The latest Debian as I write this (10.7) uses `libreadline7`. So does CentOS 8. Most people would consider all these, along with Ubuntu 18.04 LTS, "major flavors of Linux".

Since it's not possible to link against multiple versions of the same library, a choice had to be made (more likely, forced upon Dr. Hipp by the build platform). That you were able to get the precompiled binaries working with libraries from a different OS instance was fortunate, but a better option would be to build the amalgamation from source.

(5) By Larry Brasfield (LarryBrasfield) on 2020-12-07 15:20:42 in reply to 4.1 [link]

Minor correction re:

>  a better option would be to build the amalgamation from source.

That is not necessary to resolve the problem(s) stated in this thread. All that is needed is to compile and link the CLI shell executable from the "amalgamation", a term which refers to certain .c and .h files which are pieced together from multiple sources in the VCS.

(6) By Dan Kennedy (dan) on 2020-12-07 15:44:04 in reply to 1 [link]

From where was this binary obtained? The ones from sqlite.org/download.html do not link against readline.

Dan.