HELP: Suddenly ImportError libssl.so.3: 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
sys.exit(main())
^^^^^^
File “/srv/homeassistant/lib/python3.11/site-packages/homeassistant/main.py”, line 181, in main
args = get_arguments()
^^^^^^^^^^^^^^^
File “/srv/homeassistant/lib/python3.11/site-packages/homeassistant/main.py”, line 81, in get_arguments
from . import config as config_util
File “/srv/homeassistant/lib/python3.11/site-packages/homeassistant/config.py”, line 20, in
from . import auth
File “/srv/homeassistant/lib/python3.11/site-packages/homeassistant/auth/init.py”, line 10, in
import jwt
File “/srv/homeassistant/lib/python3.11/site-packages/jwt/init.py”, line 1, in
from .api_jwk import PyJWK, PyJWKSet
File “/srv/homeassistant/lib/python3.11/site-packages/jwt/api_jwk.py”, line 7, in
from .algorithms import get_default_algorithms, has_crypto, requires_cryptography
File “/srv/homeassistant/lib/python3.11/site-packages/jwt/algorithms.py”, line 12, in
from .utils import (
File “/srv/homeassistant/lib/python3.11/site-packages/jwt/utils.py”, line 7, in
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve
File “/srv/homeassistant/lib/python3.11/site-packages/cryptography/hazmat/primitives/asymmetric/ec.py”, line 11, in
from cryptography.hazmat._oid import ObjectIdentifier
File “/srv/homeassistant/lib/python3.11/site-packages/cryptography/hazmat/_oid.py”, line 9, in
from cryptography.hazmat.bindings._rust import (
ImportError: libssl.so.3: 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?

2 Likes

Hi, same problem here.

  • Upgraded from 2023.7 to 2023.9 → failure: ImportError: libssl.so.3: 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

kr
j

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 libssl.so.3 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 (libsssl.so.3) are not there, HASS will not start. Deb 11 doesn´t bring the required libraries - try to run"find / -name libssl.so.3" or so

kr
j

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, libssl.so.3 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

Agree!

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 http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi
deb http://deb.debian.org/debian bookworm InRelease
deb http://deb.debian.org/debian bookworm-updates InRelease
deb http://security.debian.org/debian-security bookworm-security InRelease
  • upgraded system to deb 12 with the following etc/apt/sources.list.d/raspi.list:
    deb http://archive.raspberrypi.org/debian/ 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

2 Likes

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: libssl.so.3: 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.