我从https://github.com/cortesi/mitmproxy下载了mitmproxy并使用以下命令安装mitmproxy:
sudo python setup.py install
如果我尝试使用:
启动mitmproxy./mitmproxy -p 8899
我收到以下错误:
Traceback (most recent call last):
File "./mitmproxy", line 19, in <module>
from libmproxy import proxy, console, cmdline
File "/Users/carl.jahn/Downloads/cortesi-mitmproxy-bc3ba4c/libmproxy/proxy.py", line 24, in <module>
import utils, flow, certutils
File "/Users/carl.jahn/Downloads/cortesi-mitmproxy-bc3ba4c/libmproxy/certutils.py", line 2, in <module>
from pyasn1.type import univ, constraint, char, namedtype, tag
ImportError: No module named pyasn1.type
如何解决错误?
由于
更新
好的,我通过
修复了它从current release下载安装urwid,并在mitmproxy文件夹中复制urwid文件夹(位于下载的urwid-X.X.X文件夹中)
安装pyasn1和pyopenssl:
pip install pyasn1
或(sudo)easy_install pyasn1
pip install pyopenssl
或(sudo)easy_install pyopenssl
使用以下内容启动mitmproxy安装:sudo python setup.py install
mitmproxy -p 8888