mythril
mythril copied to clipboard
An error occurred after installing mythril: z3.z3types.Z3Exception: libz3.so not found.
trafficstars
Description
When I use the following command: myth --version, the following error occurs : Could not find libz3.so; consider adding the directory containing it to
- your system's PATH environment variable,
- the Z3_LIBRARY_PATH environment variable, or
- to the custom Z3_LIBRARY_DIRS Python-builtin before importing the z3 module, e.g. via import builtins builtins.Z3_LIB_DIRS = [ '/path/to/libz3.so' ]
Expected behavior
How can I solve it?
Environment
Ubuntu 16.04 solc 0.5.12 mythril 0.21.17
can you try doing python -c "import z3"?
can you try doing
python -c "import z3"?
Could not find libz3.so; consider adding the directory containing it to
- your system's PATH environment variable,
- the Z3_LIBRARY_PATH environment variable, or
- to the custom Z3_LIB_DIRS Python-builtin before importing the z3 module, e.g. via
import builtins
builtins.Z3_LIB_DIRS = [ '/path/to/libz3.so' ]
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.8/site-packages/z3/__init__.py", line 1, in <module>
from .z3 import *
File "/usr/lib/python3.8/site-packages/z3/z3.py", line 48, in <module>
from . import z3core
File "/usr/lib/python3.8/site-packages/z3/z3core.py", line 67, in <module>
raise Z3Exception("libz3.%s not found." % _ext)
z3.z3types.Z3Exception: libz3.so not found.
Fix for opensuse: zypper in z3-devel (you need to install z3 dev package)