Kkevsterrr / geneva

automated censorship evasion for the client-side and server-side
https://censorship.ai
BSD 3-Clause "New" or "Revised" License
1.94k stars 183 forks source link

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

Open shakibamoshiri opened 9 months ago

shakibamoshiri commented 9 months ago

Trying to test on a fresh Debian 11,

first

apt-get install build-essential python-dev libnetfilter-queue-dev libffi-dev libssl-dev iptables python3-pip

second

python3 -m pip install -r requirements.txt

...

Successfully built scapy mysql-connector netfilterqueue
Installing collected packages: pycparser, tomli, pluggy, packaging, iniconfig, exceptiongroup, coverage, charset-normalizer, cffi, soupsieve, requests, pytest, pynacl, cryptography, bcrypt, tqdm, tld, scapy, python-dotenv, pytest-cov, psutil, paramiko, netifaces, netfilterqueue, mysql-connector, graphviz, docker, dnspython, codecov, beautifulsoup4, anytree
  Attempting uninstall: requests
    Found existing installation: requests 2.25.1
    Not uninstalling requests at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'requests'. No files were found to uninstall.
Successfully installed anytree-2.12.1 bcrypt-4.1.2 beautifulsoup4-4.12.3 cffi-1.16.0 charset-normalizer-3.3.2 codecov-2.1.13 coverage-7.4.3 cryptography-3.3.2 dnspython-2.6.1 docker-7.0.0 exceptiongroup-1.2.0 graphviz-0.20.1 iniconfig-2.0.0 mysql-connector-2.2.9 netfilterqueue-1.1.0 netifaces-0.11.0 packaging-23.2 paramiko-3.4.0 pluggy-1.4.0 psutil-5.9.8 pycparser-2.21 pynacl-1.5.0 pytest-8.0.2 pytest-cov-4.1.0 python-dotenv-1.0.1 requests-2.31.0 scapy-2.4.3 soupsieve-2.5 tld-0.13 tomli-2.0.1 tqdm-4.66.2

third

trying to test

geneva (master)# python3 ./engine.py --server-port 8080 --strategy "\/" --log debug
Traceback (most recent call last):
  File "/opt/app/geneva/./engine.py", line 22, in <module>
    from scapy.layers.inet import IP
  File "/usr/local/lib/python3.9/dist-packages/scapy/layers/inet.py", line 25, in <module>
    from scapy.layers.l2 import Ether, Dot3, getmacbyip, CookedLinux, GRE, SNAP, \
  File "/usr/local/lib/python3.9/dist-packages/scapy/layers/l2.py", line 17, in <module>
    from scapy.ansmachine import AnsweringMachine
  File "/usr/local/lib/python3.9/dist-packages/scapy/ansmachine.py", line 16, in <module>
    from scapy.sendrecv import send, sniff
  File "/usr/local/lib/python3.9/dist-packages/scapy/sendrecv.py", line 35, in <module>
    import scapy.route  # noqa: F401
  File "/usr/local/lib/python3.9/dist-packages/scapy/route.py", line 194, in <module>
    conf.route = Route()
  File "/usr/local/lib/python3.9/dist-packages/scapy/route.py", line 27, in __init__
    self.resync()
  File "/usr/local/lib/python3.9/dist-packages/scapy/route.py", line 33, in resync
    from scapy.arch import read_routes
  File "/usr/local/lib/python3.9/dist-packages/scapy/arch/__init__.py", line 28, in <module>
    from scapy.arch.bpf.core import get_if_raw_addr
  File "/usr/local/lib/python3.9/dist-packages/scapy/arch/bpf/core.py", line 31, in <module>
    LIBC = cdll.LoadLibrary(find_library("libc"))
  File "/usr/lib/python3.9/ctypes/util.py", line 341, in find_library
    _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name))
  File "/usr/lib/python3.9/ctypes/util.py", line 147, in _findLib_gcc
    if not _is_elf(file):
  File "/usr/lib/python3.9/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'

and it seems the lib has been installed

find / -name libc.a
/usr/lib/x86_64-linux-gnu/libc.a

and it seems relevant to #61

Kaimar666 commented 9 months ago

这是一封自动回复邮件。已经收到您的来信。

shakibamoshiri commented 9 months ago

One solution found link

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