ฉันพยายามติดตั้งแพ็กเกจ mitmproxy ผ่าน pip เช่นนี้:
$ sudo pip install mitmproxy
มันจบลงด้วยข้อความแสดงข้อผิดพลาดดังต่อไปนี้:
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
หลังจากนี้จะติดตั้งค่อนข้างน้อยฉันสามารถถอนการติดตั้งในภายหลัง
$ mitmproxy
นำไปสู่
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