Repository navigation
python3.7 throws exceptions about missing getifaddrs #175
Description
Activity
- added 2 commits that reference this issue
on Mar 11, 2019 - added a commit that references this issue
on Dec 15, 2019 - added 2 commits that reference this issue
on Jan 8, 2020 - added a commit that references this issue
on Feb 6, 2020 Hi there,
I'm having the same problem:
2020-03-06 11:25:09 ERROR (MainThread) [homeassistant.setup] Error during setup of component zeroconf
Traceback (most recent call last):
File "/opt/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 174, in _async_setup_component
component.setup, hass, processed_config # type: ignore
File "/opt/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/homeassistant/lib/python3.7/site-packages/homeassistant/components/zeroconf/__init__.py", line 42, in setup
zeroconf = Zeroconf()
File "/opt/homeassistant/lib/python3.7/site-packages/zeroconf/__init__.py", line 2134, in __init__
interfaces, unicast, ip_version, apple_p2p=apple_p2p
File "/opt/homeassistant/lib/python3.7/site-packages/zeroconf/__init__.py", line 2056, in create_sockets
interfaces = normalize_interface_choice(interfaces, ip_version)
File "/opt/homeassistant/lib/python3.7/site-packages/zeroconf/__init__.py", line 1922, in normalize_interface_choice
result.extend(get_all_addresses())
File "/opt/homeassistant/lib/python3.7/site-packages/zeroconf/__init__.py", line 1844, in get_all_addresses
for iface in ifaddr.get_adapters()
File "/opt/homeassistant/lib/python3.7/site-packages/ifaddr/_posix.py", line 44, in get_adapters
retval = libc.getifaddrs(ctypes.byref(addr))
File "/opt/local/lib/python3.7/ctypes/__init__.py", line 377, in __getattr__
func = self.__getitem__(name)
File "/opt/local/lib/python3.7/ctypes/__init__.py", line 382, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: ld.so.1: python3.7: fatal: getifaddrs: can't find symbolIIRC you can patch /opt/homeassistant/lib/python3.7/site-packages/ifaddr/_posix.py to use libsocket instead of libc and it works.
Also see ifaddr/ifaddr#23
Thanks @sjorge!
- added 2 commits that reference this issue
on Mar 22, 2020 103 remaining items
- added a commit that references this issue
on May 14, 2026 - added 7 commits that reference this issue
on May 22, 2026 - added a commit that references this issue
on Jun 2, 2026 - added 2 commits that reference this issue
on Jul 26, 2026 - added a commit that references this issue
on Aug 7, 2026 - added a commit that references this issue
on Aug 25, 2026 - added a commit that references this issue
on Sep 6, 2026 - added a commit that references this issue
on Sep 22, 2026