core: `GLIBC_2.33' not found
The problem
After upgrading the core from 2021.12.10 to 2022.2.2, my Google Nest integration failed completely (no communication & unable to even remove the integration; no response from the widget). The error “`GLIBC_2.33’ not found” is shown across each log, pointing to a missing component in my OS’s (Raspbian Bullseye) libc6 package.
So I attempted to install an updated libc6 package that is not yet deemed compatible (from Raspbian Bookworm). But after a reboot, the error just changed to a different missing component… and also killed my SSH server no matter how I troubleshot it.
Downgrading the core back to 2021.12.10 allowed my Google Nest integration to work again 100%. Though I still had to restore a backup to resurrect SSH…
Again, running Raspbian Bullseye on a Raspberry Pi 4b, 4GB. See the attached logs for debugging. I’d really like to apply the thousands of Home Assistant fixes/updates from the latest version, so any help is greatly appreciated. Thanks!
TL;DR - Solution steps in my comment below
What version of Home Assistant Core has the issue?
2022.2.2
What was the last working version of Home Assistant Core?
2021.12.10
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Google Nest
Link to integration documentation on our website
https://www.home-assistant.io/integrations/nest/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
********** Output from "sudo systemctl status homeassistant" **********
● homeassistant.service - Home Assistant
Loaded: loaded (/etc/systemd/system/homeassistant.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2022-02-05 13:32:38 EST; 2min 27s ago
Main PID: 3698 (hass)
Tasks: 18 (limit: 4915)
CPU: 1min 22.727s
CGroup: /system.slice/homeassistant.service
└─3698 /srv/homeassistant/bin/python /srv/homeassistant/bin/hass -c /home/homeassistant/.homeassistant
Feb 05 13:34:16 HALiving hass[3698]: ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /srv/homeassistant/lib/python3.9/site-packages/grpc/_cython/cygrpc.cpython-39-arm-linux-gnueabihf.so)
Feb 05 13:34:16 HALiving hass[3698]: During handling of the above exception, another exception occurred:
Feb 05 13:34:16 HALiving hass[3698]: Traceback (most recent call last):
Feb 05 13:34:16 HALiving hass[3698]: File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 203, in async_init
Feb 05 13:34:16 HALiving hass[3698]: flow, result = await task
Feb 05 13:34:16 HALiving hass[3698]: File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 221, in _async_init
Feb 05 13:34:16 HALiving hass[3698]: flow = await self.async_create_flow(handler, context=context, data=data)
Feb 05 13:34:16 HALiving hass[3698]: File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/config_entries.py", line 740, in async_create_flow
Feb 05 13:34:16 HALiving hass[3698]: raise data_entry_flow.UnknownHandler
Feb 05 13:34:16 HALiving hass[3698]: homeassistant.data_entry_flow.UnknownHandler
********** Error 1 of 2 from Home Assistant log **********
Logger: homeassistant.config_entries
Source: config_entries.py:735
First occurred: 1:34:16 PM (3 occurrences)
Last logged: 1:34:16 PM
Error occurred loading configuration flow for integration nest: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /srv/homeassistant/lib/python3.9/site-packages/grpc/_cython/cygrpc.cpython-39-arm-linux-gnueabihf.so)
********** Error 2 of 2 from Home Assistant log **********
Logger: homeassistant
Source: config_entries.py:740
First occurred: 1:34:16 PM (3 occurrences)
Last logged: 1:34:16 PM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/config_entries.py", line 733, in async_create_flow
integration.get_platform("config_flow")
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 566, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 583, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/nest/__init__.py", line 49, in <module>
from . import api, config_flow
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/nest/api.py", line 12, in <module>
from google_nest_sdm.google_nest_subscriber import GoogleNestSubscriber
File "/srv/homeassistant/lib/python3.9/site-packages/google_nest_sdm/google_nest_subscriber.py", line 14, in <module>
from google.cloud import pubsub_v1
File "/srv/homeassistant/lib/python3.9/site-packages/google/cloud/pubsub_v1/__init__.py", line 17, in <module>
from google.cloud.pubsub_v1 import types
File "/srv/homeassistant/lib/python3.9/site-packages/google/cloud/pubsub_v1/types.py", line 36, in <module>
from google.pubsub_v1.types import pubsub as pubsub_gapic_types
File "/srv/homeassistant/lib/python3.9/site-packages/google/pubsub_v1/__init__.py", line 18, in <module>
from .services.publisher import PublisherClient
File "/srv/homeassistant/lib/python3.9/site-packages/google/pubsub_v1/services/publisher/__init__.py", line 18, in <module>
from .client import PublisherClient
File "/srv/homeassistant/lib/python3.9/site-packages/google/pubsub_v1/services/publisher/client.py", line 27, in <module>
from google.api_core import gapic_v1 # type: ignore
File "/srv/homeassistant/lib/python3.9/site-packages/google/api_core/gapic_v1/__init__.py", line 18, in <module>
from google.api_core.gapic_v1 import config
File "/srv/homeassistant/lib/python3.9/site-packages/google/api_core/gapic_v1/config.py", line 23, in <module>
import grpc
File "/srv/homeassistant/lib/python3.9/site-packages/grpc/__init__.py", line 22, in <module>
from grpc import _compression
File "/srv/homeassistant/lib/python3.9/site-packages/grpc/_compression.py", line 15, in <module>
from grpc._cython import cygrpc
ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /srv/homeassistant/lib/python3.9/site-packages/grpc/_cython/cygrpc.cpython-39-arm-linux-gnueabihf.so)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 203, in async_init
flow, result = await task
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 221, in _async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/config_entries.py", line 740, in async_create_flow
raise data_entry_flow.UnknownHandler
homeassistant.data_entry_flow.UnknownHandler
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 54 (11 by maintainers)
This issue still happens.
I mainly have the same approach; built the
grpc, installed “locally”, and everytime I update my HA-core:unlink /srv/homeassistant/lib/python3.9/site-packages/grpcln -s /usr/local/lib/python3.9/site-packages/grpc /srv/homeassistant/lib/python3.9/site-packages/This worked for me, on pi4, bullesye, but had to add latomic
GRPC_PYTHON_LDFLAGS="-lpthread -Wl,-wrap,memcpy -static-libgcc -latomic"Not clear whether you’ve built grpc within or outside your venv. I recommend doing it outside, not sure if you can even do the build when you’re in the venv. Anyway, if you followed my steps above (as root, outside the venv) you should have a new grpc directory at /usr/local/lib/python3.9/dist-packages/grpc Do ls -ld /usr/local/lib/python3.9/dist-packages/grpc you should see a grpc directory with the timestamp from the time you built it If you don’t see that then follow my steps again exactly, as root, not in your venv Now go to your venv directory and type ls -ld lib/python3.9/site-packages/grpc If you see something like lrwxrwxrwx 1 root root 43 Feb 4 12:08 lib/python3.9/site-packages/grpc -> /usr/local/lib/python3.9/dist-packages/grpc then you’re good to go, that’s what you should see at the end of the job If there’s nothing there that’s good, type cd lib/python3.9/site-packages ln -s /usr/local/lib/python3.9/dist-packages/grpc If you see an actual grpc directory there, then do rm -rf lib/python3.9/site-packages/grpc then follow the cd and ln steps above
To test whether you’ve got it all good, go into your venv and activate it Then type python3 <enter> At the >>> prompt type import grpc <enter> If you see another >>> prompt you’re all good otherwise you’ll see some error
You don’t actually need to do this if you are building grpc from the master or v1.44.x branch. The fix is already in place there, otherwise you can git cherry-pick it before building grpc 😊
For the record, Google Nest integration works now! “GLIBC_2.33 not found” no longer an issue. Here are my overall steps while ssh’d into my virtual environment (homeassistant), right after running
pip3 install --upgrade homeassistantto upgrade my Home Assistant from 2021.12.10:configure environment for grpc rebuild (via a trial/error of commands from @allenporter’s comment; without this step, step 2 will not fix the “GLIBC_2.33 not found” error)
pip3 install cythonexport GRPC_BUILD_WITH_BORING_SSL_ASM=falseexport GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=trueexport GRPC_PYTHON_BUILD_WITH_CYTHON=trueexport GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=trueexport GRPC_PYTHON_LDFLAGS="-lpthread -Wl,-wrap,memcpy -static-libgcc"rebuild grpc (after step 1, this fixes the “GLIBC_2.33 not found” error & introduces another; each command takes ~5 minutes or so to complete)
pip3 install --upgrade grpcio-tools --force-reinstall --no-binary=grpcio-toolspip3 install --upgrade grpcio --force-reinstall --no-binary=grpciobackup & fix grpc to include link to libatomic (this fixes the “undefined symbol: __atomic…” error, as per @Alberto97’s comment from issue #25720) EDIT: This step shouldn’t be necessary in grpc v1.44.x, as the fix was merged there. Mine happened to be v1.43.
pip3 install patchelfcd /srv/homeassistant/lib/python3.9/site-packages/grpc/_cythoncp cygrpc.cpython-39-arm-linux-gnueabihf.so cygrpc.cpython-39-arm-linux-gnueabihf.so.origpatchelf cygrpc.cpython-39-arm-linux-gnueabihf.so --add-needed /lib/arm-linux-gnueabihf/libatomic.so.1exit & restart homeassistant
exitsudo systemctl restart homeassistantOh also, there are some environment variables home assistant sets for GRPC when building from source: https://github.com/home-assistant/core/blob/0321f208ff1e85a21aef527442486e0f1f080e7b/.github/workflows/wheels.yml#L42 and this is a
Dockerfilei’ve used to get it working on alpine https://github.com/allenporter/wheels-grpc/blob/main/builder/Dockerfile – e.g. maybe GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY helps, but I’m not at all sure.