Ubuntu 安装 mitmProxy
直接使用编译好的二进制包
参考:
https://cuiqingcai.com/31053.html#Linux-%E4%B8%8B%E7%9A%84%E5%AE%89%E8%A3%85
直接下载下载编译好的二进制包
https://mitmproxy.org/
![在这里插入图片描述](https://img-blog.csdnimg.cn/f331501d76ac48a686c12b4042285749.png)
解压出来,得到mitmproxy mitmdump mitmweb
![在这里插入图片描述](https://img-blog.csdnimg.cn/894bf276ac2446639fe1b496769996cb.png)
sudo mv mitmproxy mitmdump mitmweb /usr/bin
之后可以直接使用
报错pkg_resources.DistributionNotFound
如果使用sudo apt install mitmproxy,安装可以成功,但是运行mitmproxy会报错:
pkg_resources.DistributionNotFound: The ‘mitmproxy==2.0.2’ distribution was not found and is required by the application:
![在这里插入图片描述](https://img-blog.csdnimg.cn/03fad26555044ee9975a3fdfd79d992d.png)
Traceback (most recent call last):
File "/usr/bin/mitmproxy", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/local/python3/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3257, in <module>
def _initialize_master_working_set():
File "/usr/local/python3/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3240, in _call_aside
f(*args, **kwargs)
File "/usr/local/python3/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3269, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/python3/lib/python3.9/site-packages/pkg_resources/__init__.py", line 582, in _build_master
ws.require(__requires__)
File "/usr/local/python3/lib/python3.9/site-packages/pkg_resources/__init__.py", line 899, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/python3/lib/python3.9/site-packages/pkg_resources/__init__.py", line 785, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'mitmproxy==2.0.2' distribution was not found and is required by the application
报错subprocess-exited-with-error
如果使用sudo pip3 install mitmproxy,会报错 subprocess-exited-with-error:
![在这里插入图片描述](https://img-blog.csdnimg.cn/15c081d067864cdfa6fd0dab42f2255b.png)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)