Mitmproxy can't work in centos 7

Traceback (most recent call last):
  File "release/specs/mitmproxy_main", line 2, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/tools/main.py", line 22, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/tools/_main.py", line 13, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/tools/cmdline.py", line 3, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/addons/__init__.py", line 1, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/addons/anticache.py", line 1, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/ctx.py", line 1, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/master.py", line 7, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/addonmanager.py", line 8, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/eventsequence.py", line 5, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/http.py", line 6, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/net/http/__init__.py", line 1, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/net/http/request.py", line 10, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/net/http/message.py", line 5, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "mitmproxy/net/http/encoding.py", line 11, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "site-packages/brotli/__init__.py", line 3, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
  File "site-packages/brotli/brotli.py", line 5, in <module>
  File "/home/travis/build/mitmproxy/mitmproxy/.tox/cibuild/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 714, in load_module
ImportError: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /tmp/_MEIEIuBGh/libstdc++.so.6)

So I just use this tools via python3?

I think creating an isolated environment for MITM using virtualenv or pyenv is the best way to go. The latter is recommended by MITM per the installation instructions. CentOS needs python 2.7.x and any upgrade would break it. So, two side by side versions (Python and Pip) is the only way to go. You can follow along this how-to:


I didn’t try it out, am in development phase, so I resorted to Fedora 28 droplet instance with private networking.
My response is late, and probably you figured it out, but thought it might be helpful for others