HELP: Suddenly ImportError cannot open shared object file

Hi, i just updated my ha from 2023.8. to 2023.9. and now i can’t start it
It always fails with
Traceback (most recent call last):
File “/srv/homeassistant/bin/hass”, line 8, in
File “/srv/homeassistant/lib/python3.11/site-packages/homeassistant/”, line 181, in main
args = get_arguments()
File “/srv/homeassistant/lib/python3.11/site-packages/homeassistant/”, line 81, in get_arguments
from . import config as config_util
File “/srv/homeassistant/lib/python3.11/site-packages/homeassistant/”, line 20, in
from . import auth
File “/srv/homeassistant/lib/python3.11/site-packages/homeassistant/auth/”, line 10, in
import jwt
File “/srv/homeassistant/lib/python3.11/site-packages/jwt/”, line 1, in
from .api_jwk import PyJWK, PyJWKSet
File “/srv/homeassistant/lib/python3.11/site-packages/jwt/”, line 7, in
from .algorithms import get_default_algorithms, has_crypto, requires_cryptography
File “/srv/homeassistant/lib/python3.11/site-packages/jwt/”, line 12, in
from .utils import (
File “/srv/homeassistant/lib/python3.11/site-packages/jwt/”, line 7, in
from import EllipticCurve
File “/srv/homeassistant/lib/python3.11/site-packages/cryptography/hazmat/primitives/asymmetric/”, line 11, in
from cryptography.hazmat._oid import ObjectIdentifier
File “/srv/homeassistant/lib/python3.11/site-packages/cryptography/hazmat/”, line 9, in
from cryptography.hazmat.bindings._rust import (
ImportError: cannot open shared object file: No such file or directory

No idea what could have caused that.
Things i tried:

  • Googled the half day
  • reinstall Python
  • create new venv
  • apt update && apt upgrade

Nothing helped.
Anyone any ideas?


Hi, same problem here.

  • Upgraded from 2023.7 to 2023.9 → failure: ImportError: cannot open shared object file: No such file or directory

  • downgraded from 2023.9 to 2023.7 → HASS starts nicely!

  • upgraded from 2023.7 to 2023.8 → same failure as mentioned above

  • downgraded again to 2023.7 → HASS starts nicely again!

These packages were installed during downgrade:

Successfully installed PyJWT-2.7.0 cryptography-41.0.1 home-assistant-bluetooth-1.10.0 homeassistant-2023.7.3 orjson-3.9.1 pip-23.1.2 ulid-transform-0.7.2


Meh, just did a fresh install of the whole raspberry and the error is still there :-/

Now trying to downgrade to 2023.7…

got the same error.

as a core user its IMHO essentiell to backup installation before update to major versions.

backup ( 3minutes / <200MB ):
tar cvpzf /mnt/disk1/Bits/bu/hac_$(cat /home/homeassistant/.homeassistant/.HA_VERSION).tar.gz /srv/homeassistant

recover latest backup ( 1min ):
tar -xf $(ls /mnt/disk1/Bits/bu/hac_* | tail -1) -C /

if something bigger fail you can return to your latest working installation in less then 1 minute.

btw. this doesn’t happen on my Debian12 arm64 VM which comes with rust

Debian 12 has installed (package libssl3) , Debian 11 and older not (package libssl1.1)

Ah, so these are supervised installs?

In my case a core Installation on Raspbian (bullseye)

1 Like

Right. You are responsible for maintaining the OS in core too.

Ok, got it, thank you!

So I´ve to wait until Rasbian is based on Debian 12, then I´m able to upgrade.

Home Assistant Core is no longer compatible with Deb 11 and older.

1 Like

Hi @joe ,

Are you sure that homeassistant core is no longer compatible with Deb 11? Did you find that into the release notes?

Hi @luca1982d,

my conclusion is based on my assumption, if the libraries ( are not there, HASS will not start. Deb 11 doesn´t bring the required libraries - try to run"find / -name" or so


Why should it not be compatible?
However, as in the past, you have to take care of the dependencies and the latest version yourself. Rust, Python, ffmpeg and now openssl… this is the combination of Debian and home assistant core. Unfortunately

Btw. Hass ≠ core

but I think that is it a big issue, is not available for Deb 11 and Raspberry OS at the moment is based on Deb 11. So we cannot upgrade to Home Assistant 2023.09 and on the release notes there aren’t any alert

1 Like

… not to mention that the recommended installation distro is still bullseye in the raspbi flash tool

1 Like


Avoiding a Frankendebian by installing openssl3 on Deb 11 - see DontBreakDebian - Debian Wiki

1 Like

Are you meaning no update of 2023.9 on Deb11?
Any workaround or alternative?

my workaround for home assistant CORE on a rpi3b+ with raspbian (deb11):

  • upgraded system to deb 12 with the following etc/apt/sources.list:
deb bookworm main contrib non-free rpi
deb bookworm InRelease
deb bookworm-updates InRelease
deb bookworm-security InRelease
  • upgraded system to deb 12 with the following etc/apt/sources.list.d/raspi.list:
    deb bookworm main ui

  • then I did the usual home assistant update from 7.3 to 9.2, which took quite a while, but finally worked.

Be careful!
kr J


I stay with 2023.08 until raspbian deb12 is released for a fresh install and enjoy not to update home assistant every month. Something I have to learn :wink:

I might have this same issue too. I was upgrading from 2023.4 to 2023.9. After upgrad, HA cannot start. In the long log I see this error information could be the problem:

ImportError: cannot open shared object file: No such file or directory

And I tried to downgrade to 2023.6, still cannot start. Finally I downgrade back to 2023.4. Everything comes back and runs normal now.

Running CORE on Hassbian (original version upgraded along times).
Also upgraded to Bookworm and so far, everything works fine.
Had to reinstall Glances since Bookworm doesn’t allow Python packages anymore, but installed it using pipx and it’s all good.