Closed utkonos closed 1 year ago
Everything works if the build is dynamically linked to the installed libyara: python setup.py build --dynamic-linking
When installing yara-python using pip on macOS, the following exception is raised:
This is expected. The magic module is not on by default, and you did not tell pip to build with that option.
If yara-python is installed from source, the following exception is raised:
This part is a local problem and is likely because you built yara-python from src without having the yara submodule, so it used whatever old version of libyara it found laying around your system which does not include the necessary symbols (yr_compiler_add_file). When you clone yara-python clone it with the --recursive flag.
The above problem is likely the same occurrence as #8
Just to make it clear for other people who encounter this problem, yara-python
needs to be installed from source rather than using pip
.
It would be nice to craft a method where a pip
installed yara-python
just worked without building from source, but until that time:
git clone --recursive git@github.com:VirusTotal/yara-python.git
python setup.py build --dynamic-linking
python setup.py install
When installing
yara-python
usingpip
on macOS, the following exception is raised:This is the YARA test file:
This is the Python testing script:
If
yara-python
is installed from source, the following exception is raised:Here are the steps I used to install from
pip
:Here are the steps I used to install from source: