Tôi đang cố gắng cài đặt gói mitmproxy qua pip như thế này:
$ sudo pip install mitmproxy
Nó kết thúc với thông báo lỗi sau:
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c:391:30: fatal error: openssl/opensslv.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Can't roll back cryptography; was not uninstalled
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-jvLTVf/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-DrY4DI-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-jvLTVf/cryptography
Storing debug log for failure in /home/niklas/.pip/pip.log
Sau đó, phần nào được cài đặt, ít nhất tôi có thể gỡ cài đặt nó sau đó.
$ mitmproxy
dẫn đến
Traceback (most recent call last):
File "/usr/local/bin/mitmproxy", line 7, in <module>
from mitmproxy.main import mitmproxy
File "/usr/local/lib/python2.7/dist-packages/mitmproxy/main.py", line 7, in <module>
from . import version, cmdline
File "/usr/local/lib/python2.7/dist-packages/mitmproxy/cmdline.py", line 6, in <module>
import configargparse
ImportError: No module named configargparse