sashs / Ropper

Display information about files in different file formats and find gadgets to build rop chains for different architectures (x86/x86_64, ARM/ARM64, MIPS, PowerPC, SPARC64). For disassembly ropper uses the awesome Capstone Framework.
https://scoding.de/ropper
BSD 3-Clause "New" or "Revised" License
1.87k stars 206 forks source link

AssertionError: filebytes>=0.9.18 .dist-info directory not found #102

Closed ghost closed 5 years ago

ghost commented 5 years ago

I have some error when install from pip on Ubuntu 16.04 (Backbox Linux). The python version is "Python 3.5.2 (default, Nov 12 2018, 13:43:14)".

root[~] >> pip3 install ropper
Collecting ropper
Collecting filebytes>=0.9.18 (from ropper)
ERROR: ropper 1.12.1 requires filebytes>=0.9.18, which is not installed.
Installing collected packages: filebytes, ropper
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/base_command.py", line 178, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/commands/install.py", line 414, in run
    use_user_site=options.use_user_site,
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/req/__init__.py", line 58, in install_given_reqs
    **kwargs
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/req/req_install.py", line 920, in install
    use_user_site=use_user_site, pycompile=pycompile,
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/req/req_install.py", line 448, in move_wheel_files
    warn_script_location=warn_script_location,
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/wheel.py", line 428, in move_wheel_files
    assert info_dir, "%s .dist-info directory not found" % req
AssertionError: filebytes>=0.9.18 .dist-info directory not found
sashs commented 5 years ago

Hi,

I do not think that this is an issue of ropper. I've just tried to install it on another distribution and it worked without problems. Could you try to install filebytes first?

pip install filebytes
ghost commented 5 years ago

I have to delete pip cache, and this is the result

root[~] >> pip install filebytes
Collecting filebytes
  Downloading https://files.pythonhosted.org/packages/0b/3a/9fc0c62bd74583137a8bbc3c8020d6a8234b9cf8bc1e99fe929688b19093/filebytes-0.9.20.tar.gz
  WARNING: Generating metadata for package filebytes produced metadata for project name unknown. Fix your #egg=filebytes fragments.
Requirement already satisfied (use --upgrade to upgrade): unknown from https://files.pythonhosted.org/packages/0b/3a/9fc0c62bd74583137a8bbc3c8020d6a8234b9cf8bc1e99fe929688b19093/filebytes-0.9.20.tar.gz#sha256=6c33986ca048e49cf1a5e2f167af9f02c7f866576b3b91a8a9124d32e57f935d in /usr/local/lib/python3.5/dist-packages/UNKNOWN-0.9.20-py3.5.egg
Building wheels for collected packages: unknown, unknown
  Building wheel for unknown (setup.py) ... done
  Stored in directory: /root/.cache/pip/wheels/5e/69/2b/08660fcb6cd841d60ff8980be781f40ee15ff014c5aaaace29
  Building wheel for unknown (setup.py) ... error
  ERROR: Complete output from command /usr/bin/python3.5 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-13mrh900/unknown/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-x8zwjl3s --python-tag cp35:
  ERROR: Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/lib/python3.5/tokenize.py", line 454, in open
      buffer = _builtin_open(filename, 'rb')
  FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-13mrh900/unknown/setup.py'
  ----------------------------------------
  ERROR: Failed building wheel for unknown
  Running setup.py clean for unknown
  ERROR: Complete output from command /usr/bin/python3.5 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-13mrh900/unknown/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all:
  ERROR: Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/lib/python3.5/tokenize.py", line 454, in open
      buffer = _builtin_open(filename, 'rb')
  FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-13mrh900/unknown/setup.py'
  ----------------------------------------
  ERROR: Failed cleaning build dir for unknown
Successfully built unknown
Failed to build unknown
sashs commented 5 years ago

As I mentioned in your filebytes issue. It is because of your very old python version.

caizixian commented 4 years ago

A workaround that works for me is to update setuptools and pip to the latest version. If you don't have privilege to do system-wide installation, use pip install --user