mwdb-core
mwdb-core copied to clipboard
ImportError: failed to find libmagic. Check your installation
trafficstars
Environment information
- MWDB version (from
/about): 2.3.0 - Installation method:
- [ ] mwdb.cert.pl service
- [x] From PyPi (
pip install mwdb-core) - [ ] From docker-compose
- [ ] Other (please explain)
- Plugins installed: none
Behaviour the bug (what happened?)
After fresh installation in Ubuntu 20.04, following the docs and spawning the mwdb-core command, we're welcomed with message:
Traceback (most recent call last):
File "/opt/mwdb-core/venv/bin/mwdb-core", line 5, in <module>
from mwdb.cli import cli
File "/opt/mwdb-core/venv/lib/python3.8/site-packages/mwdb/cli/__init__.py", line 1, in <module>
from .cli import cli
File "/opt/mwdb-core/venv/lib/python3.8/site-packages/mwdb/cli/cli.py", line 10, in <module>
from .configuration import create_configuration
File "/opt/mwdb-core/venv/lib/python3.8/site-packages/mwdb/cli/configuration.py", line 10, in <module>
from mwdb.core.util import token_hex
File "/opt/mwdb-core/venv/lib/python3.8/site-packages/mwdb/core/util.py", line 16, in <module>
import magic
File "/opt/mwdb-core/venv/lib/python3.8/site-packages/magic.py", line 201, in <module>
raise ImportError('failed to find libmagic. Check your installation')
ImportError: failed to find libmagic. Check your installation
We need to add to the docs that libmagic-dev is required.
Expected behaviour
All required dependencies are installed after following the instruction in docs
Hmm, it seems to me that we should require libmagic1 instead of libmagic-dev:
# dpkg -S libmagic
libmagic1:amd64: /usr/lib/x86_64-linux-gnu/libmagic.so.1