pip3 install virtualenv mkdir angr cd angr_enviroment/ virtualenv -p (python的位置) venv source venv/bin/activate pip3 install angr python3 import angr
如 import angr 遇错误:
Python 3.9.10 (main, Feb 22 2022, 13:54:07)
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import angr
Traceback (most recent call last):
File "", line 1, in
File "/root/angr/venv/lib/python3.9/site-packages/angr/__init__.py", line 22, in
from .utils.formatting import setup_terminal
File "/root/angr/venv/lib/python3.9/site-packages/angr/utils/__init__.py", line 5, in
from . import enums_conv
File "/root/angr/venv/lib/python3.9/site-packages/angr/utils/enums_conv.py", line 6, in
from ..protos.primitives_pb2 import Edge
File "/root/angr/venv/lib/python3.9/site-packages/angr/protos/__init__.py", line 10, in
from . import primitives_pb2
File "/root/angr/venv/lib/python3.9/site-packages/angr/protos/primitives_pb2.py", line 32, in
_descriptor.EnumValueDescriptor(
File "/root/angr/venv/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 755, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
则
pip uninstall protobuf pip install protobuf==3.20.1
参考:
(18条消息) 在wsl上安装angr框架_ljahum的博客-CSDN博客
(21条消息) TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file……_Xavier Jiezou的博客-CSDN博客



