cert-ee / cuckoo3

Cuckoo 3 is a Python 3 open source automated malware analysis system.
European Union Public License 1.2
596 stars 75 forks source link

Error: No module named 'hyperscan._hyperscan' #35

Open knowpage opened 1 year ago

knowpage commented 1 year ago

I got this error when running "cuckoo -d" My hyperscan version is 0.4.0, and I tried to fix it like issue 32 but it does not work, can anyone help me please?

image

knowpage commented 1 year ago

2023-05-04 09:17:37 ERROR [cuckoo.runprocessing]: Failed to import plugins for worker. worker=post0 importpath=cuckoo.processing.post.eventconsumer abstractclass=<class 'cuckoo.processing.abtracts.EventConsumer'> error=Failed to import: cuckoo.processing.post.eventconsumer.patternsigs. Error: No module named 'hyperscan._hyperscan' 2023-05-04 09:17:37 DEBUG [cuckoo.runprocessing]: Stopping worker. workername=post0 2023-05-04 09:17:37 ERROR [cuckoo.runprocessing]: Worker setup failed. See worker logs. workername=post0 2023-05-04 09:17:37 DEBUG [cuckoo.common.shutdown]: Calling shutdown method. method=<function WorkReceiver.start.._stop_wrapper at 0x7fb259e53940> 2023-05-04 09:17:37 INFO [cuckoo.runprocessing]: Worker stopping.. worker=post0 worktype=post 2023-05-04 09:17:37 DEBUG [cuckoo.common.shutdown]: Calling shutdown method. method=<bound method DBMS.cleanup of <cuckoo.common.db.DBMS object at 0x7fb25595d0d0>> 2023-05-04 09:17:37 DEBUG [cuckoo.common.shutdown]: Calling shutdown method. method=<bound method DBMS.cleanup of <cuckoo.common.db.DBMS object at 0x7fb25595d0d0>> 2023-05-04 09:17:38 ERROR [cuckoo.runprocessing]: Worker disconnected unexpectedly. workername=post0 2023-05-04 09:17:38 DEBUG [cuckoo.runprocessing]: Stopping worker. workername=post0

knowpage commented 1 year ago

image my current hyperscan version is 0.4.0 too

Cryss76 commented 1 year ago

can you show me the content of your python-hyperscan folder in your venv installation folder? It should be something like: <venv>/lib/python3.8/site-packages/hyperscan

knowpage commented 1 year ago

image It like this...

twinprism commented 1 year ago

Also seeing this same error,

verified hyperscan version .40, tried to reinstall hyperscan & wheel as mentioned in Issue 32,

Screenshot 2023-05-10 at 7 42 18 PM Screenshot 2023-05-10 at 7 43 08 PM
LafQuentin commented 1 year ago

I also have this problem image image

amadisson commented 1 year ago

There also should be: _hyperscan.cpython-38-x86_64-linux-gnu.so

knowpage commented 1 year ago

There also should be: _hyperscan.cpython-38-x86_64-linux-gnu.so

Do u have any suggestions to add the following mising .so file?

twinprism commented 1 year ago

I've tried a few things to get this to build..

Looking to see if there was something missing required to build the .so file.

here are the errors from

(venv) pip install --log /tmp/hyperscan2.txt --ignore-installed hyperscan

2023-05-14T22:25:07,849 ERROR: sflock 1.0.3 has requirement cryptography<39.0.0,>=38.0.4, but you'll have cryptography 40.0.2 which is incompatible. 2023-05-14T22:25:07,849 ERROR: cuckoo-processing 0.1.1 has requirement cryptography<39.0.0,>=38.0.4, but you'll have cryptography 40.0.2 which is incompatible. 2023-05-14T22:25:07,849 ERROR: virtualenv 20.23.0 has requirement platformdirs<4,>=3.2, but you'll have platformdirs 2.6.2 which is incompatible.

Maybe the .so file is in a whl file...

Created wheel for hyperscan: filename=hyperscan-0.4.0-cp38-cp38-manylinux_2_31_x86_64.whl size=19010 sha256=5230955347311403e09181e33fdbb0a27b548a4276633361a9fa501b71c8036d Stored in directory: /home/cuckoo/.cache/pip/wheels/80/ce/64/484e69b7a86008af4db7f45acef18402d297b7585d8d839c91

But this file also doesn't have the .so file.. I guess I need to learn more about python packaging, but would the version conflicts above prevent it from being built?

Cryss76 commented 1 year ago

I had a similar problem while installing cuckoo on ubuntu 20.04. The Problem was that pip didn't properly installed hyperscan and didn't create _hyperscan.pyi in the site-package folder.

The solution was to update pip: pip install -U pip and then reinstall hyperscan:

pip uninstall hyperscan
pip install -U hyperscan

This doesn't seemed the case with @trangnt2304 and @LafQuentin but it may be worth while trying it. Also don't forget to apt install libhyperscan5 libhyperscan-dev.

knowpage commented 1 year ago

hmm I tried but this does not work :((

knowpage commented 1 year ago

this does not work :(

Cryss76 commented 1 year ago

I would need a detailed description on how you guys setup cuckoo to figure out what went wrong.

zer0py2c commented 1 year ago

@trangnt2304 Try downgrading the version to 0.2.0 :)