core: Incompatible PiWheels built wheels when on Debian Stretch or lower

Home Assistant release with the issue: 0.96.0

Last working Home Assistant release (if known): 0.95.4, but rollback does not work

Operating environment (Hass.io/Docker/Windows/etc.): hassbian, python 3.7

Component/platform: cloud

Description of problem:

2019-07-18 21:28:31 ERROR (MainThread) [homeassistant.setup] Error during setup of component cloud
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 153, in _async_setup_component
    hass, processed_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/cloud/__init__.py", line 142, in async_setup
    from hass_nabucasa import Cloud
  File "/srv/homeassistant/lib/python3.7/site-packages/hass_nabucasa/__init__.py", line 16, in <module>
    from .remote import RemoteUI
  File "/srv/homeassistant/lib/python3.7/site-packages/hass_nabucasa/remote.py", line 16, in <module>
    from .acme import AcmeClientError, AcmeHandler
  File "/srv/homeassistant/lib/python3.7/site-packages/hass_nabucasa/acme.py", line 9, in <module>
    import OpenSSL
  File "/srv/homeassistant/lib/python3.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/srv/homeassistant/lib/python3.7/site-packages/OpenSSL/crypto.py", line 16, in <module>
    from OpenSSL._util import (
  File "/srv/homeassistant/lib/python3.7/site-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/srv/homeassistant/lib/python3.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 15, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /usr/lib/arm-linux-gnueabihf/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /srv/homeassistant/lib/python3.7/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so)

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):


Traceback (if applicable):


Additional information: I upgraded to 0.96.0, and there is no cloud. I down graded hassbian-config upgrade homeassistant=0.95.4 same problem.

not sure what is going on here. nothing with ssl works now.

also # cat /etc/debian_version 9.9

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 27 (19 by maintainers)

Most upvoted comments

The reason why this broke, PiWheels builds wheels against Debian Buster, which has a newer glibc, which now causes issues if you are still on Debian Stretch.

There are 2 possible option to get this fixed:

Option 1: IMHO the best / future proof /preferred option

Upgrade your distribution to Debian Buster. After upgrade, everything works as intended.

Pros: more future proof, Piwheels work. Cons: Upgrades your whole system and might affect other things you might be running on your device.

Steps:

  • Edit stretch to buster in the following files:
    • /etc/apt/sources.list
    • /etc/apt/sources.list.d/raspi.list
    • /etc/apt/sources.list.d/hassbian.list
  • sudo apt-get update
  • sudo apt-get -y dist-upgrade
  • sudo reboot

Option 2:

Disable Piwheels prebuild packages.

Pros: Quick and easy. Cons: You’ll end up with a possible slow updating/upgrading/installation when new packages need to be installed, since it needs to compile them from source. You are still on Stretch, which is not really future proof.

Steps:

  • Edit /etc/pip.conf and comment out the extra-index-url like this:

    [global]
    # extra-index-url=https://www.piwheels.org/simple
    
  • source /srv/homeassistant/bin/activate

  • pip uninstall cryptography

  • pip install --no-cache cryptography==2.7

update libssl-dev on rpi will not change anything because the available version is still 1.1.0

pi@rpi:~ $ apt-cache policy libssl-dev
libssl-dev:
  Installed: 1.1.0k-1~deb9u1
  Candidate: 1.1.0k-1~deb9u1
  Version table:
 *** 1.1.0k-1~deb9u1 500
        500 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages
        100 /var/lib/dpkg/status

for me this issue broke also Xiaomi IR Remote component based on miio