frida / frida-website

Frida's website
MIT License
83 stars 195 forks source link

Unable to install frida-tools on ubuntu 18.04 inside China #164

Closed DevDengChao closed 4 years ago

DevDengChao commented 4 years ago

I tried to install frida by $ pip3 install frida-tools but found it stop at Running setup.py bdist_wheel for frida for a long time at first. Then I try to find out what happend with $ pip3 install -v frida-tools, then I get the log below (I'm using aliyun's pip mirror):

Collecting frida-tools
  1 location(s) to search for versions of frida-tools:
  * https://mirrors.aliyun.com/pypi/simple/frida-tools/
  Getting page https://mirrors.aliyun.com/pypi/simple/frida-tools/
  Starting new HTTPS connection (1): mirrors.aliyun.com
  https://mirrors.aliyun.com:443 "GET /pypi/simple/frida-tools/ HTTP/1.1" 200 2742
  Analyzing links from page https://mirrors.aliyun.com/pypi/simple/frida-tools/
    Found link https://mirrors.aliyun.com/pypi/packages/70/e6/391a842d169df131b16899bb9afb115d90906a9c85d8bbaaab344180b11b/frida-tools-1.0.0.tar.gz#sha256=99088e2d3842ce8846f2dfe59dc7f2509046776ee3505dc24466ee9ad37ae901 (from https://mirrors.aliyun.com/pypi/simple/frida-tools/), version: 1.0.0

    ......

    Found link https://mirrors.aliyun.com/pypi/packages/bb/f5/142b3e9b37258e7f9c266e3cf21437fa6e591ab9781405f407cd901b1299/frida-tools-6.0.1.tar.gz#sha256=d8b1d5d229a29df6391ba9d10d666969230062c707308f1e8489d9f399204018 (from https://mirrors.aliyun.com/pypi/simple/frida-tools/), version: 6.0.1
  Using version 6.0.1 (newest of versions: 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.3.0, 1.3.1, 1.3.2, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.2.0, 3.0.0, 3.0.1, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 5.0.0, 5.0.1, 5.1.0, 5.2.0, 5.3.0, 5.4.0, 6.0.0, 6.0.1)
  Using cached wheel link: file:///home/dengchao/.cache/pip/wheels/cb/49/01/ec27e471749cc68ae34bb156b1702a48c36838ddf60d8b86de/frida_tools-6.0.1-cp36-none-any.whl
Collecting colorama<1.0.0,>=0.2.7 (from frida-tools)
  1 location(s) to search for versions of colorama:
  * https://mirrors.aliyun.com/pypi/simple/colorama/
  Getting page https://mirrors.aliyun.com/pypi/simple/colorama/
  https://mirrors.aliyun.com:443 "GET /pypi/simple/colorama/ HTTP/1.1" 200 7403
  Analyzing links from page https://mirrors.aliyun.com/pypi/simple/colorama/
    Found link https://mirrors.aliyun.com/pypi/packages/9f/30/5166407fe8e1fb932cf377b0d1c5ec72ec07e372452302875ef1263fec6c/colorama-0.1.1.tar.gz#sha256=4b53b07a72a276642ef0f6aed4a7083480bff6d5dcc44a5972352369c1694309 (from https://mirrors.aliyun.com/pypi/simple/colorama/), version: 0.1.1

    ......

    Found link https://mirrors.aliyun.com/pypi/packages/cb/9f/27d4844ac5bf158a33900dbad7985951e2910397998e85712da03ce125f0/Pygments-2.5.2.tar.gz#sha256=98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe (from https://mirrors.aliyun.com/pypi/simple/pygments/), version: 2.5.2
  Using version 2.5.2 (newest of versions: 2.0.2, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.2.0, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.4.2, 2.5.1, 2.5.2)
  https://mirrors.aliyun.com:443 "GET /pypi/packages/be/39/32da3184734730c0e4d3fa3b2b5872104668ad6dc1b5a73d8e477e5fe967/Pygments-2.5.2-py2.py3-none-any.whl HTTP/1.1" 200 896106
  Downloading https://mirrors.aliyun.com/pypi/packages/be/39/32da3184734730c0e4d3fa3b2b5872104668ad6dc1b5a73d8e477e5fe967/Pygments-2.5.2-py2.py3-none-any.whl (896kB)
  Downloading from URL https://mirrors.aliyun.com/pypi/packages/be/39/32da3184734730c0e4d3fa3b2b5872104668ad6dc1b5a73d8e477e5fe967/Pygments-2.5.2-py2.py3-none-any.whl#sha256=2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b (from https://mirrors.aliyun.com/pypi/simple/pygments/)
Collecting frida<13.0.0,>=12.8.5 (from frida-tools)
  1 location(s) to search for versions of frida:
  * https://mirrors.aliyun.com/pypi/simple/frida/
  Getting page https://mirrors.aliyun.com/pypi/simple/frida/
  https://mirrors.aliyun.com:443 "GET /pypi/simple/frida/ HTTP/1.1" 200 587821
  Analyzing links from page https://mirrors.aliyun.com/pypi/simple/frida/
    Skipping link https://mirrors.aliyun.com/pypi/packages/5d/80/3b140c5998df9d81e40169f188a2347b6c705156a2b556ff308e2f8b7e0a/frida-1.4.1-py2.6-macosx-10.9-intel.egg#sha256=eef92210084ef083b34f8972078550c6ef45255e444905f95495792c7f709546 (from https://mirrors.aliyun.com/pypi/simple/frida/); unsupported archive format: .egg

    ......

    Skipping link https://mirrors.aliyun.com/pypi/packages/59/4c/88fc03fbd7c3f94f06bd89e90d036b03db666044eabd5a7d9a76c1f18046/frida-9.1.9-py3.6-win32.egg#sha256=3b95654dd4e0b0e09fa9eb2c72b42090aa383a08d5d54d7e5b32ffc63f1f0816 (from https://mirrors.aliyun.com/pypi/simple/frida/); unsupported archive format: .egg
    Found link https://mirrors.aliyun.com/pypi/packages/4e/ca/ee40ef1d5013300a77152ff0687caedc3b5ea1f786bf3e0b778de5fc0b8a/frida-9.1.9.tar.gz#sha256=d2158844cc20cd3e2f8d2cd95f90449f0c27d051d9868706c1eda5d357eb86d7 (from https://mirrors.aliyun.com/pypi/simple/frida/), version: 9.1.9
  Using version 12.8.11 (newest of versions: 12.8.5, 12.8.6, 12.8.7, 12.8.8, 12.8.9, 12.8.10, 12.8.11)
  https://mirrors.aliyun.com:443 "GET /pypi/packages/63/ec/df3fcf52d893c1562be4073363d760d06d157fddeaad7dd526e169e19748/frida-12.8.11.tar.gz HTTP/1.1" 200 6928
  Downloading https://mirrors.aliyun.com/pypi/packages/63/ec/df3fcf52d893c1562be4073363d760d06d157fddeaad7dd526e169e19748/frida-12.8.11.tar.gz
  Downloading from URL https://mirrors.aliyun.com/pypi/packages/63/ec/df3fcf52d893c1562be4073363d760d06d157fddeaad7dd526e169e19748/frida-12.8.11.tar.gz#sha256=f56bd10457767f4d7c42d76d93c53bbd5e9b0409f0efd52542f61b7c1a222fb0 (from https://mirrors.aliyun.com/pypi/simple/frida/)
  Running setup.py (path:/tmp/pip-build-mnrbvetb/frida/setup.py) egg_info for package frida
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/frida.egg-info
    writing pip-egg-info/frida.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/frida.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/frida.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/frida.egg-info/SOURCES.txt'
    reading manifest file 'pip-egg-info/frida.egg-info/SOURCES.txt'
    writing manifest file 'pip-egg-info/frida.egg-info/SOURCES.txt'
    /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
  Source in /tmp/pip-build-mnrbvetb/frida has version 12.8.11, which satisfies requirement frida<13.0.0,>=12.8.5 from https://mirrors.aliyun.com/pypi/packages/63/ec/df3fcf52d893c1562be4073363d760d06d157fddeaad7dd526e169e19748/frida-12.8.11.tar.gz#sha256=f56bd10457767f4d7c42d76d93c53bbd5e9b0409f0efd52542f61b7c1a222fb0 (from frida-tools)
Collecting prompt-toolkit<4.0.0,>=3.0.3 (from frida-tools)
  1 location(s) to search for versions of prompt-toolkit:
  * https://mirrors.aliyun.com/pypi/simple/prompt-toolkit/
  Getting page https://mirrors.aliyun.com/pypi/simple/prompt-toolkit/
  https://mirrors.aliyun.com:443 "GET /pypi/simple/prompt-toolkit/ HTTP/1.1" 200 18480
  Analyzing links from page https://mirrors.aliyun.com/pypi/simple/prompt-toolkit/
    Found link https://mirrors.aliyun.com/pypi/packages/e3/37/4f97706e0121ab50fa92ff571724ea66bc12fa13da064bca7b2dc82b8c5b/prompt_toolkit-0.1.tar.gz#sha256=2162fe9646f397f4b4553a57c760054e36b43cde4bd7d67b7164fa6511fa781f (from https://mirrors.aliyun.com/pypi/simple/prompt-toolkit/), version: 0.1

    ......

    Found link https://mirrors.aliyun.com/pypi/packages/8f/bc/58ba47a2a864d8e3d968d03b577c85fbdf52c8d324a030df71ac9c06c1b5/prompt_toolkit-3.0.3.tar.gz#sha256=a402e9bf468b63314e37460b68ba68243d55b2f8c4d0192f85a019af3945050e (from https://mirrors.aliyun.com/pypi/simple/prompt-toolkit/) (requires-python:>=3.6), version: 3.0.3
  Using version 3.0.3 (newest of versions: 3.0.3)
  https://mirrors.aliyun.com:443 "GET /pypi/packages/f5/22/f00412fafc68169054cc623a35c32773f22b403ddbe516c8adfdecf25341/prompt_toolkit-3.0.3-py3-none-any.whl HTTP/1.1" 200 348445
  Downloading https://mirrors.aliyun.com/pypi/packages/f5/22/f00412fafc68169054cc623a35c32773f22b403ddbe516c8adfdecf25341/prompt_toolkit-3.0.3-py3-none-any.whl (348kB)
  Downloading from URL https://mirrors.aliyun.com/pypi/packages/f5/22/f00412fafc68169054cc623a35c32773f22b403ddbe516c8adfdecf25341/prompt_toolkit-3.0.3-py3-none-any.whl#sha256=c93e53af97f630f12f5f62a3274e79527936ed466f038953dfa379d4941f651a (from https://mirrors.aliyun.com/pypi/simple/prompt-toolkit/) (requires-python:>=3.6)
Collecting wcwidth (from prompt-toolkit<4.0.0,>=3.0.3->frida-tools)
  1 location(s) to search for versions of wcwidth:
  * https://mirrors.aliyun.com/pypi/simple/wcwidth/
  Getting page https://mirrors.aliyun.com/pypi/simple/wcwidth/
  https://mirrors.aliyun.com:443 "GET /pypi/simple/wcwidth/ HTTP/1.1" 200 1536
  Analyzing links from page https://mirrors.aliyun.com/pypi/simple/wcwidth/
    Found link https://mirrors.aliyun.com/pypi/packages/1e/87/432c601218773d2dd202e5b8bf80ff457586974e566992869fadb7092ca1/wcwidth-0.0.1.tar.gz#sha256=7e6f252e18af0d6fde002502e0fc4b83feaf0150d4bcc976c8b7f4fc1f57c84e (from https://mirrors.aliyun.com/pypi/simple/wcwidth/), version: 0.0.1

    ......

    Found link https://mirrors.aliyun.com/pypi/packages/5e/33/92333eb80be0c96385dee338f30b53e24a8b415d5785e225d789b3f90feb/wcwidth-0.1.8.tar.gz#sha256=f28b3e8a6483e5d49e7f8949ac1a78314e740333ae305b4ba5defd3e74fb37a8 (from https://mirrors.aliyun.com/pypi/simple/wcwidth/), version: 0.1.8
  Using version 0.1.8 (newest of versions: 0.0.1, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8)
  https://mirrors.aliyun.com:443 "GET /pypi/packages/58/b4/4850a0ccc6f567cc0ebe7060d20ffd4258b8210efadc259da62dc6ed9c65/wcwidth-0.1.8-py2.py3-none-any.whl HTTP/1.1" 200 17980
  Downloading https://mirrors.aliyun.com/pypi/packages/58/b4/4850a0ccc6f567cc0ebe7060d20ffd4258b8210efadc259da62dc6ed9c65/wcwidth-0.1.8-py2.py3-none-any.whl
  Downloading from URL https://mirrors.aliyun.com/pypi/packages/58/b4/4850a0ccc6f567cc0ebe7060d20ffd4258b8210efadc259da62dc6ed9c65/wcwidth-0.1.8-py2.py3-none-any.whl#sha256=8fd29383f539be45b20bd4df0dc29c20ba48654a41e661925e612311e9f3c603 (from https://mirrors.aliyun.com/pypi/simple/wcwidth/)
Building wheels for collected packages: frida
  Running setup.py bdist_wheel for frida: started
  Destination directory: /tmp/tmpz1oh3lwgpip-wheel-
  Running command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mnrbvetb/frida/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/tmpz1oh3lwgpip-wheel- --python-tag cp36
  /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/frida
  copying frida/core.py -> build/lib.linux-x86_64-3.6/frida
  copying frida/__init__.py -> build/lib.linux-x86_64-3.6/frida
  running build_ext
  querying pypi for available prebuilds
  downloading prebuilt extension from https://files.pythonhosted.org/packages/8c/6a/b00b270b8af2ae103ee394fcf983b037f0e746cc039ce80df8066e802311/frida-12.8.11-py3.6-linux-x86_64.egg
  Running setup.py bdist_wheel for frida: finished with status 'error'
  Running setup.py clean for frida
  Running command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mnrbvetb/frida/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all
  /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
    warnings.warn(msg)
  running clean
  removing 'build/lib.linux-x86_64-3.6' (and everything under it)
  'build/bdist.linux-x86_64' does not exist -- can't clean it
  'build/scripts-3.6' does not exist -- can't clean it
  removing 'build'
Failed to build frida
Installing collected packages: colorama, pygments, frida, wcwidth, prompt-toolkit, frida-tools

Cleaning up...
  Removing source in /tmp/pip-build-mnrbvetb/frida
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 360, in run
    prefix=options.prefix_path,
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/usr/lib/python3.6/shutil.py", line 103, in copyfile
    if _samefile(src, dst):
  File "/usr/lib/python3.6/shutil.py", line 88, in _samefile
    return os.path.samefile(src, dst)
  File "/usr/lib/python3.6/genericpath.py", line 97, in samefile
    s2 = os.stat(f2)
KeyboardInterrupt

The key is that it is downloading this item https://files.pythonhosted.org/packages/8c/6a/b00b270b8af2ae103ee394fcf983b037f0e746cc039ce80df8066e802311/frida-12.8.11-py3.6-linux-x86_64.egg, I tried to download it with aria2c, but it told me the download may take hours to complete.

Then I found the egg file from aliyun: https://mirrors.aliyun.com/pypi/packages/8c/6a/b00b270b8af2ae103ee394fcf983b037f0e746cc039ce80df8066e802311/frida-12.8.11-py3.6-linux-x86_64.egg, downloaded within seconds, put it under ~/.

But how to install an egg?

What should I do then?

DevDengChao commented 4 years ago

"How to install an egg" is sovled:

  1. $ pip3 install setuptools to install easy_install command line tool.
  2. $ easy_install --user frida-12.8.11-py3.6-linux-x86_64.egg to install the egg only for yourself.

Reference: https://setuptools.readthedocs.io/en/latest/easy_install.html#downloading-and-installing-a-package

DevDengChao commented 4 years ago

But I still cannot install frida-tools by using $ pip3 install frida-tools even if I installed the egg manually.

r0p3cina commented 4 years ago

What happened to this ?

oleavr commented 4 years ago

@r0p3cina See frida/frida-python#162.