pip - 在centos7上安装mitmproxy

标签 pip pillow centos7 mitmproxy

我在 centos7 x64 上安装 mitmproxy 时遇到问题。
我已经在我的操作系统上安装了:

  • 软件包 libxslt-devel-1.1.28-5.el7.x86_64 已安装且最新版本
  • 软件包 libxml2-devel-2.9.1-5.el7_1.2.x86_64 已安装且最新版本
  • 软件包 libxml2-devel-2.9.1-5.el7_1.2.x86_64 已安装且最新版本
  • 软件包 libxslt-devel-1.1.28-5.el7.x86_64 已安装且最新版本
  • [root@localhost ~]# python -V > Python 2.7.3
  • 软件包 libffi-devel-3.0.13-11.el7.x86_64 已安装且最新版本
  • 软件包 python-urllib3-1.10.2-2.el7_1.noarch 已安装且最新版本
  • 软件包 python-pillow-2.0.0-17.gitd1c6db8.el7.x86_64 已安装且最新版本

  • 错误是:
    [root@localhost ~]# pip install mitmproxy 
     Failed building wheel for Pillow
    Failed to build Pillow
    Installing collected packages: Pillow, construct, html2text, mitmproxy
    Running setup.py install for Pillow
    Complete output from command /usr/local/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-JmmUK9/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-sQcNE2-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    running egg_info
    writing Pillow.egg-info/PKG-INFO
    writing top-level names to Pillow.egg-info/top_level.txt
    writing dependency_links to Pillow.egg-info/dependency_links.txt
    warning: manifest_maker: standard file '-c' not found
    
    reading manifest file 'Pillow.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'Pillow.egg-info/SOURCES.txt'
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-JmmUK9/Pillow/setup.py", line 767, in <module>
        zip_safe=not debug_build(),
      File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/local/lib/python2.7/distutils/command/install.py", line 563, in run
        self.run_command('build')
      File "/usr/local/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python2.7/distutils/command/build.py", line 127, in run
        self.run_command(cmd_name)
      File "/usr/local/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python2.7/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/tmp/pip-build-JmmUK9/Pillow/setup.py", line 515, in build_extensions
        % (f, f))
    ValueError: --enable-jpeg requested but jpeg not found, aborting.
    
    ----------------------------------------
    Command "/usr/local/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-JmmUK9/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-sQcNE2-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-JmmUK9/Pillow
    

    最佳答案

    查看 http://docs.mitmproxy.org/en/stable/install.html 中列出的依赖项:

    你至少失踪了libjpeg8-dev .

    关于pip - 在centos7上安装mitmproxy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33653233/

    相关文章:

    python - 为什么 pip freeze >requirements.txt 不输出 Django?

    python - 计算不同颜色的像素 - Python

    ldap_modify : Other (e. g.,具体实现)错误 (80)

    docker - 在 RPM 文件中运行 docker load

    Python 无法获取在 Ubuntu 上安装 Python 2.7 的请求

    python-2.7 - pip install psycopg2==2.6 给出错误命令 "python setup.py egg_info"failed with error code 1 in/tmp/pip-build-f6rRmm/psycopg2/

    python - pip 只能安装指定类型的预发布版本吗?

    python - 我怎样才能在 PIL 图像中没有红色像素和黑色像素

    python - 在 python 3.6 中使用 matplotlib.image 在 python 中打开 .jpg 图像

    python - 网络驱动程序异常 : Message: unknown error: Chrome failed to start: crashed