Sqlite client with readline support on Pi, please

I would dearly like to have readline support compiled into the sqlite3 client, so that I can use the arrow keys to recall the command history.

I know I can install and use rlwrap, but that depends on perl (and all the packages that entails).


How did you install the SQLite client? I think sudo apt-get install sqlite3 will do the trick


When I checked, the sqlite3 package is not installed

osmc@osmc:~$ dpkg -L sqlite3
dpkg-query: package 'sqlite3' is not installed

However it was already there in /usr/osmc/bin.
I’m running your Krypton beta 5 from deb http://apt.osmc.tv krypton main

osmc@osmc:~$ find /usr/osmc -name *sqlite* -print

And it’s not got readline:

osmc@osmc:~$ ldd $(which sqlite3)
        linux-vdso.so.1 (0x7e905000)
        /usr/lib/libarmmem.so (0x76f60000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76f46000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76f23000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76e33000)
        /lib/ld-linux-armhf.so.3 (0x54ba5000)

Will the /usr/osmc/bin version go away when OSMC moves to Krypton?



This is a downstream implementation; there is a patch to SQLite to use mmap’d IO which provides better performance for single user Kodi libraries. It only exists for the lib implementation. I added the binary to be on the safe side for those that want to make a quick edit, but may actually remove this.

You should be able to install sqlite3 from the Debian repository without a conflict.

I’ve made a note of this, but I’ll probably just remove the binary entirely and get people to use the Debian one instead of adding readline support. Let me know if the Debian binary doesn’t have readline support



OK, I installed the Debian one and it has readline support. Yay!

May all become moot if I get around to installing ethernet cable over the holidays as I will be moving the databases over to MySQL at that point.