Error loading shared library


CoreOS 1068.8.0 (Stable) here, with Docker Server Version: 1.10.3.

I run mitmproxy (dev), the latest version from the docker hub, with this command:
docker run --rm -it mitmproxy/mitmproxy:dev

This is what I get:
Traceback (most recent call last): File "/usr/bin/mitmproxy", line 9, in <module> load_entry_point('mitmproxy==0.18', 'console_scripts', 'mitmproxy')() File "/usr/lib/python3.5/site-packages/pkg_resources/", line 558, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3.5/site-packages/pkg_resources/", line 2682, in load_entry_point return ep.load() File "/usr/lib/python3.5/site-packages/pkg_resources/", line 2355, in load return self.resolve() File "/usr/lib/python3.5/site-packages/pkg_resources/", line 2361, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python3.5/site-packages/mitmproxy/", line 9, in <module> from mitmproxy import cmdline File "/usr/lib/python3.5/site-packages/mitmproxy/", line 9, in <module> from mitmproxy import filt File "/usr/lib/python3.5/site-packages/mitmproxy/", line 40, in <module> from mitmproxy.models.http import HTTPFlow File "/usr/lib/python3.5/site-packages/mitmproxy/models/", line 3, in <module> from netlib.http import decoded File "/usr/lib/python3.5/site-packages/netlib/http/", line 2, in <module> from netlib.http.request import Request File "/usr/lib/python3.5/site-packages/netlib/http/", line 13, in <module> from netlib.http import message File "/usr/lib/python3.5/site-packages/netlib/http/", line 8, in <module> from netlib import encoding, strutils, basetypes File "/usr/lib/python3.5/site-packages/netlib/", line 11, in <module> import brotli File "/usr/lib/python3.5/site-packages/brotli/", line 2, in <module> from .brotli import decompress, Decompressor, compress # noqa File "/usr/lib/python3.5/site-packages/brotli/", line 4, in <module> from ._brotli import ffi, lib ImportError: Error loading shared library No such file or directory (needed by /usr/lib/python3.5/site-packages/brotli/

It was working, last week… Now it fails. :frowning:


We recently added the support for the brotli compression algorithm, which depends on brotlipy python package and that is where the issue seems to be.

Maybe you could try filing this issue over at

Or you could just use a previous version of mitm for the the time being. v0.17 will work I guess.

I filed an issue there. Thanks for the info!