Sqlite version update

Hi…I would need asterisk to access the currently installed sqlite3 version which is 3.46…while if I run some python scripts from the diaplan it gives me the SQLite version: 3.26.0 which was the original one.
how could I do it?
Thank you

That’s not something Asterisk is really responsible for. It would be your Python environment.

sqlite3 --version in the console gives me the right version…3.46…
If I launch the scripts manually, no problem…even if I call them from a bash script…
But those that are launched inside the dialplan, if I do a bit of debugging, it gives me the sqlite3 version 3.26 which was the original one…
Which I really don’t know where to get…anyway I’ll investigate…
Thanks for the reply…

Maybe these will yield clues:

which -a sqlite3

        or

sudo find / -type f -name sqlite3

I suspect different PATH values between the environments.

which -a sqlite3
/root/opt/sqlite/bin/sqlite3
/usr/bin/sqlite3

sudo find / -type f -name sqlite3
/root/opt/sqlite/bin/sqlite3
/usr/share/bash-completion/completions/sqlite3
/usr/bin/sqlite3
/usr/src/sqlite-autoconf-3460100/sqlite3

Just a note… When asterisk starts, the system loader loads the sqlite3 library dynamically from the system library path. HOWEVER… In some distros, the /usr/bin/sqlite3 command itself may be statically bound to the sqlite3 library when it was compiled. To see what’s going on, use the ldd command…

# ldd /usr/sbin/asterisk         
        ...
	libxml2.so.2 => /lib64/libxml2.so.2 (0x00007f3a726a5000)
	libxslt.so.1 => /lib64/libxslt.so.1 (0x00007f3a723bb000)
	libsqlite3.so.0 => /lib64/libsqlite3.so.0 (0x00007f3a7225d000)
        ...
	libssl.so.3 => /lib64/libssl.so.3 (0x00007f3a72186000)
	libzstd.so.1 => /lib64/libzstd.so.1 (0x00007f3a7146c000)
	libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007f3a71a91000)
# ldd /usr/bin/sqlite3
	linux-vdso.so.1 (0x00007faaedc08000)
	libreadline.so.8 => /lib64/libreadline.so.8 (0x00007faaed9bc000)
	libm.so.6 => /lib64/libm.so.6 (0x00007faaed8d8000)
	libz.so.1 => /lib64/libz.so.1 (0x00007faaed8b7000)
	libc.so.6 => /lib64/libc.so.6 (0x00007faaed6c6000)
	libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007faaed699000)
	/lib64/ld-linux-x86-64.so.2 (0x00007faaedc0a000)

That’s from a Fedora system. Notice that while asterisk is linked dynamically to /lib64/libsqlite3.so.0, /usr/bin/sqlite3 isn’t. Most redhat based systems statically link the sqlite3 library to /usr/bin/sqlite3.

Most debian based systems dynamically link the library to /usr/bin/sqlite3 however
From ubuntu24…

# ldd /bin/sqlite3
	linux-vdso.so.1 (0x00007f37defcd000)
	libsqlite3.so.0 => /lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f37dee06000)
	libreadline.so.8 => /lib/x86_64-linux-gnu/libreadline.so.8 (0x00007f37dedb1000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f37ded95000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f37dea00000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f37decac000)
	libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f37dec76000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f37defcf000)

You can also run sqlite3 --version to see what version the binary thinks it is.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.