supervisor: No such file or directory: b'liblibc.a'
lid31dat1
Python 3.7.10
supervisor 4.2.2
blissadm@lid31dat1:~/local/daemon/config/supervisor.d$ supervisorctl reread
Traceback (most recent call last):
File "/usr/bin/supervisorctl", line 33, in <module>
sys.exit(load_entry_point('supervisor==4.2.2', 'console_scripts', 'supervisorctl')())
File "/usr/bin/supervisorctl", line 25, in importlib_load_entry_point
return next(matches).load()
File "/users/blissadm/conda/miniconda/envs/multivisor/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 203, in load
module = import_module(match.group('module'))
File "/users/blissadm/conda/miniconda/envs/multivisor/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/users/blissadm/conda/miniconda/envs/multivisor/lib/python3.7/site-packages/supervisor/supervisorctl.py", line 40, in <module>
from supervisor.options import ClientOptions
File "/users/blissadm/conda/miniconda/envs/multivisor/lib/python3.7/site-packages/supervisor/options.py", line 26, in <module>
from supervisor.grouplist import grouplist
File "/users/blissadm/conda/miniconda/envs/multivisor/lib/python3.7/site-packages/supervisor/grouplist.py", line 7, in <module>
libc = cdll.LoadLibrary(find_library('libc'))
File "/users/blissadm/conda/miniconda/envs/multivisor/lib/python3.7/ctypes/util.py", line 351, in find_library
_get_soname(_findLib_gcc(name) or _findLib_ld(name))
File "/users/blissadm/conda/miniconda/envs/multivisor/lib/python3.7/ctypes/util.py", line 148, in _findLib_gcc
if not _is_elf(file):
File "/users/blissadm/conda/miniconda/envs/multivisor/lib/python3.7/ctypes/util.py", line 100, in _is_elf
with open(filename, 'br') as thefile:
FileNotFoundError: [Errno 2] No such file or directory: b'liblibc.a'
I fixed it temporary by replacing
libc = cdll.LoadLibrary(find_library('libc'))
with
libc = cdll.LoadLibrary(find_library('c'))
This works for all python versions
python -c "import ctypes.util;ctypes.util.find_library('c')"
This works only for python < 3.7
python -c "import ctypes.util;ctypes.util.find_library('libc')"