How to upgrade libsqlite3 on debian 12 stable?

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
theprez
Posts: 10
Joined: 2024-01-05 15:07
Has thanked: 2 times

How to upgrade libsqlite3 on debian 12 stable?

#1 Post by theprez »

Hello,

I run debian 12 stable, with libsqlite3-0:amd64 version 3.40.1-2 as given in the PPA (https://packages.debian.org/bookworm/libsqlite3-0)

I would like to test a python program (with a GUI) that requires sqlite > 3.43

As far as I understand the python3 sqlite standard module from https://github.com/python/cpython/blob/ ... t__.py#L24 is just a wrapper over the distro's libsqlite.

I can't use libsqlite3-0 from sid, because it requires a different libc.

How can I safely install a different version of libsqlite3? I'm also open to solutions with containers.

User avatar
ruwolf
Posts: 866
Joined: 2008-02-18 05:04
Location: Banovce nad Bebravou
Has thanked: 78 times
Been thanked: 62 times

Re: How to upgrade libsqlite3 on debian 12 stable?

#2 Post by ruwolf »

There are several option.
I have found older docker version with guide (for Ubuntu, but difference should be very minimal and analogous).
You can also try guix, there is currently available sqlite 3.46.0 (and python 3.10.7).

User avatar
stevepusser
Posts: 12972
Joined: 2009-10-06 05:53
Has thanked: 42 times
Been thanked: 78 times

Re: How to upgrade libsqlite3 on debian 12 stable?

#3 Post by stevepusser »

It's probable the Sid source can be backported for Bookworm, and, as I recall, it was non-invasive the last time I did it some years ago.
MX Linux packager and developer

User avatar
stevepusser
Posts: 12972
Joined: 2009-10-06 05:53
Has thanked: 42 times
Been thanked: 78 times

Re: How to upgrade libsqlite3 on debian 12 stable?

#4 Post by stevepusser »

Here's an OBS repository (very much like a PPA) with the backports: https://build.opensuse.org/package/show ... 46/sqlite3
MX Linux packager and developer

blackbird
Posts: 23
Joined: 2023-08-17 04:42
Been thanked: 2 times

Re: How to upgrade libsqlite3 on debian 12 stable?

#5 Post by blackbird »

That's an interesting guide. As far as I know for running GUI applications in Docker there needs to be done some more setting, though I never tried it.

The option with the locally installed version of libsql should work, but with different environment variables:

LD_RUN_PATH=/usr/local/lib should only work if set during build time of Python
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBARARY_PATH should work and be the best option or
LD_PRELOAD=/usr/local/lib/<name of lib> which is not meant for this problem, but should also work

Maybe the most modern option would be to create a Flatpak of the Python program with the dependency libsql in the needed version.

User avatar
stevepusser
Posts: 12972
Joined: 2009-10-06 05:53
Has thanked: 42 times
Been thanked: 78 times

Re: How to upgrade libsqlite3 on debian 12 stable?

#6 Post by stevepusser »

Since it's a straightforward backport, you can also rebuild your own packages from the upstream source in the Debian repositories:

https://wiki.debian.org/SimpleBackportCreation
MX Linux packager and developer

theprez
Posts: 10
Joined: 2024-01-05 15:07
Has thanked: 2 times

Re: How to upgrade libsqlite3 on debian 12 stable?

#7 Post by theprez »

ruwolf wrote: 2024-08-27 10:49 There are several option.
I have found older docker version with guide (for Ubuntu, but difference should be very minimal and analogous).
You can also try guix, there is currently available sqlite 3.46.0 (and python 3.10.7).
Hello, I decided to try guix and installed 1.4.0 from the standard bookworm depot.
I see the sqlite package you mention https://packages.guix.gnu.org/packages/sqlite/3.46.0/ but guix search sqlite spits out :

Code: Select all

$ guix search sqlite
name: sqlite
version: 3.39.3
location: gnu/packages/sqlite.scm:114:2


name: sqlite
version: 3.36.0
location: gnu/packages/sqlite.scm:62:2
homepage: https://www.sqlite.org/
I did 'guix pull guix package -u && hash guix 'before guix search.
If I do 'guix refresh ' I get error :

Code: Select all

$ guix refresh
gnu/packages/zile.scm:113:14: warning: no tags were found for zile-on-guile
gnu/packages/zig.scm:33:13: zig would be upgraded from 0.9.1 to 0.13.0
gnu/packages/xorg.scm:1408:13: libxres would be upgraded from 1.2.1 to 1.2.2
;;; Failed to autoload html->sxml in (htmlprag):
;;; no code for module (htmlprag)
Backtrace:
In ice-9/boot-9.scm:
  1752:10 16 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
          15 (apply-smob/0 #<thunk 7ffb9670d2e0>)
In ice-9/boot-9.scm:
    724:2 14 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
    619:8 13 (_ #(#(#<directory (guile-user) 7ffb96712c80>)))
In guix/ui.scm:
   2275:7 12 (run-guix . _)
  2238:10 11 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1752:10 10 (with-exception-handler _ _ #:unwind? _ # _)
  1752:10  9 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   661:37  8 (thunk)
  2170:25  7 (run-with-store #<store-connection 256.99 7ffb7ef67d70> …)
In guix/scripts/refresh.scm:
   567:14  6 (_ _)
In srfi/srfi-1.scm:
    634:9  5 (for-each #<procedure 7ffb8e5bfa40 at guix/scripts/ref…> …)
In guix/scripts/refresh.scm:
   367:10  4 (check-for-package-update #<package xclock@1.0.9 gnu/p…> …)
In srfi/srfi-1.scm:
   858:15  3 (any1 #<procedure 7ffb7ec13720 at guix/upstream.scm:28…> …)
In guix/gnu-maintenance.scm:
   842:10  2 (_ _ . _)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
error: html->sxml: unbound variable

According to https://git.savannah.gnu.org/cgit/guix. ... 8ff0514714, it looks like guix 1.4.0 can only offer sqlite up to 3.39.3 , bit of a bummer really :D
Question 1 : from https://packages.debian.org/sid/guix, how do I know which tag has been used in the guix code?
Question 2 : can I easily switch to using the most recent guix package definitions? If not I will try the backport way.

Post Reply