RaspberryPI - HA Core - Version 3.27.2 of SQLite is not supported

When upgrading to HA 2021.11.0 I get the message:

Logger: homeassistant.components.recorder.util
Source: components/recorder/util.py:304
Integration: Recorder (documentation, issues)
First occurred: 16:52:42 (1 occurrences)
Last logged: 16:52:42

Version 3.27.2 of SQLite is not supported; minimum supported version is 3.32.1. Starting with Home Assistant 2022.2 this will prevent the recorder from starting. Please upgrade your database software before then

I am running HA Core on a Raspberry PI…

$ cat /etc/rpi-issue
Raspberry Pi reference 2019-09-26
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 80d486687ea77d31fc3fc13cf3a2f8b464e129be, stage2

When I try to upgrade sqlite3 I get…

$ sudo apt install sqlite3 --upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
sqlite3 is already the newest version (3.27.2-3+deb10u1).

Any suggestions on how I move forward?

1 Like

I found a solution, documenting for others…

wget https://sqlite.org/2021/sqlite-autoconf-3360000.tar.gz
tar -xvf sqlite-autoconf-3360000.tar.gz
cd sqlite-autoconf-3360000
sudo make install

hass still complained. It turned out to be where the libraries were installed.
The old libraries were in /usr/lib/arm-linux-gnueabihf/, whereas the new ones were in /usr/local/lib.
At that point I took the easy option (hass is the only application running, so no risk to other apps)…

sudo cp /usr/local/lib/*sql* /usr/lib/arm-linux-gnueabihf/
sudo chmod a+x /usr/lib/arm-linux-gnueabihf/*sql*

hass then restated without the warning.


thanks, i wanted to do this over a few weeks, but now i did it today.
cause i dont have to search anymore for the best way of doing this. :+1:

1 Like

is there any option more clean than the copy command above ?
thank You

I tried a lot of different things to get this working, I didn’t want to overwrite the system sqlite.

Annoyingly there is no clean way to point a freshly compiled python at a freshly compiled sqlite (eg a --with-sqlite configure flag).

In the end I stood up a local mariadb instance.

What would be nice would be if HA supported using the pysqlite3 module, which offers compatibility with the stdlib sqlite3 but allows a custom sqlite build.

I found an alternative solution by updating Raspberry Pi package list:

sudo nano /etc/apt/sources.list

then I added this line:

deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi

Save & exit the file, then type:

sudo apt update
sudo apt install sqlite3 -t bullseye

Once it’s done installing/updating you can check the sqlite3 version by typing:

sqlite3 --version

It should output something like this:

3.34.1 2021-01-20 14:10:07 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ealt1

FYI, my RaspberryPi3 is running

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION="9 (stretch)"

Don´t work for me:

sudo apt install sqlite3 -t bullseye
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
No se pudieron instalar algunos paquetes. Esto puede significar que
usted pidió una situación imposible o, si está usando la distribución
inestable, que algunos paquetes necesarios aún no se han creado o se
han sacado de «Incoming».
La siguiente información puede ayudar a resolver la situación:

Los siguientes paquetes tienen dependencias incumplidas:
 libc6-dev : Rompe: libgcc-8-dev (< 8.4.0-2~) pero 8.3.0-6+rpi1 va a ser instalado
E: Error, pkgProblemResolver::Resolve generó cortes, esto puede deberse a paquetes retenidos.

Doesn’t work for me either:

sudo apt install sqlite3 -t bullseye
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-6+rpi1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

This is on Raspberry PI 4 …

The solution from ColinRobbins worked fine for me!
Thanks a lot ColinRobbins!

I did this today, and it seemed to work as it should. Then I tried to reboot, and I now have two Pi’s that throws an error message saying “No session for pid xxx”, and the menu line in Buster doesn’t show. :scream: I have not yet found a fix for it.