Cannot install: "command 'x86_64-linux-gnu-gcc' failed with exit status 1"

I have trouble installing mitmproxy on my Ubuntu 16.04. When installing, I get the following output: (I pasted only the part that seems significant to this issue for brevity)

    creating build/temp.linux-x86_64-3.5/build/temp.linux-x86_64-3.5
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c build/temp.linux-x86_64-3.5/_openssl.c -o build/temp.linux-x86_64-3.5/build/temp.linux-x86_64-3.5/_openssl.o
    build/temp.linux-x86_64-3.5/_openssl.c:724:6: error: conflicting types for ‘BIO_new_mem_buf’
     BIO *BIO_new_mem_buf(void *, int);
    In file included from /usr/include/openssl/asn1.h:65:0,
                     from build/temp.linux-x86_64-3.5/_openssl.c:440:
    /usr/include/openssl/bio.h:692:6: note: previous declaration of ‘BIO_new_mem_buf’ was here
     BIO *BIO_new_mem_buf(const void *buf, int len);
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I suspect it is a problem with a version of one of the dependencies…? How do I fix it? :slight_smile:

@kuba-orlik What command did you use to install mitmproxy?

This is the actual issue, btw:

This is the command that I used:

pip install mitmproxy

Should I use a different command?

Well, I used the docker image and it worked :wink:

docker run --rm -it -p 8080:8080 mitmproxy/releases

Where did you get the instructions for the docker image?
mitmproxy/mitmproxy is the suggested one, mitmproxy/releases is deprecated. Did we miss updating that somewhere?

It says so in the docker hub page:

(under the “Usage” heading) :slight_smile:

Thanks, this is fixed now. :slight_smile:

1 Like