shramos / polymorph

Polymorph is a real-time network packet manipulation framework with support for almost all existing protocols
GNU General Public License v2.0
445 stars 61 forks source link

FileNotFoundError: [Errno 2] No such file or directory: b'liblibc.a' #30

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi,

After upgrading polymorph to version 2.0.6, I get this error:

Traceback (most recent call last): File "/usr/bin/polymorph", line 7, in <module> from polymorph.UI.maininterface import MainInterface File "/usr/venvs/polymorph/lib/python3.8/site-packages/polymorph/UI/maininterface.py", line 5, in <module> from polymorph.UI.interface import Interface File "/usr/venvs/polymorph/lib/python3.8/site-packages/polymorph/UI/interface.py", line 9, in <module> from polymorph.utils import set_ip_forwarding File "/usr/venvs/polymorph/lib/python3.8/site-packages/polymorph/utils.py", line 5, in <module> from scapy.sendrecv import sniff File "/usr/venvs/polymorph/lib/python3.8/site-packages/scapy/sendrecv.py", line 35, in <module> import scapy.route # noqa: F401 File "/usr/venvs/polymorph/lib/python3.8/site-packages/scapy/route.py", line 199, in <module> conf.route = Route() File "/usr/venvs/polymorph/lib/python3.8/site-packages/scapy/route.py", line 27, in __init__ self.resync() File "/usr/venvs/polymorph/lib/python3.8/site-packages/scapy/route.py", line 33, in resync from scapy.arch import read_routes File "/usr/venvs/polymorph/lib/python3.8/site-packages/scapy/arch/__init__.py", line 27, in <module> from scapy.arch.bpf.core import get_if_raw_addr File "/usr/venvs/polymorph/lib/python3.8/site-packages/scapy/arch/bpf/core.py", line 30, in <module> LIBC = cdll.LoadLibrary(find_library("libc")) File "/usr/pyenv/versions/3.8.7/lib/python3.8/ctypes/util.py", line 330, in find_library _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name)) File "/usr/pyenv/versions/3.8.7/lib/python3.8/ctypes/util.py", line 147, in _findLib_gcc if not _is_elf(file): File "/usr/pyenv/versions/3.8.7/lib/python3.8/ctypes/util.py", line 99, in _is_elf with open(filename, 'br') as thefile: FileNotFoundError: [Errno 2] No such file or directory: b'liblibc.a'

shramos commented 3 years ago

I think it has to do with this bug (https://stackoverflow.com/questions/65410481/filenotfounderror-errno-2-no-such-file-or-directory-bliblibc-a) and the new version of python, could you confirm me if the proposed solution fixes the problem?

ghost commented 3 years ago

Hi, Yes it fixed the problem, that's what I did exactly

ln -s /usr/lib/x86_64-linux-gnu/libc.a /usr/lib/x86_64-linux-gnu/liblibc.a

Thanks,