Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required dependency libmagic not present on macOS #755

Closed
anothertobi opened this issue Mar 13, 2023 · 2 comments · Fixed by #762
Closed

Required dependency libmagic not present on macOS #755

anothertobi opened this issue Mar 13, 2023 · 2 comments · Fixed by #762
Labels
bug Something isn't working

Comments

@anothertobi
Copy link
Contributor

The latest version of commodore (1.15.1) requires libmagic. On macOS, libmagic is not available by default.

Steps to Reproduce the Problem

On macOS Ventura (13.2.1):

  1. python3 -m venv venv
  2. source venv/bin/activate
  3. pip install --upgrade syn-commodore

Actual Behavior

commodore --version

/Users/tobi/Library/Python/3.9/lib/python/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (5.1.0)/charset_normalizer (2.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
Traceback (most recent call last):
  File "/Users/tobi/Library/Python/3.9/bin/commodore", line 5, in <module>
    from commodore.cli import main
  File "/Users/tobi/Library/Python/3.9/lib/python/site-packages/commodore/cli/__init__.py", line 13, in <module>
    from .catalog import catalog_group
  File "/Users/tobi/Library/Python/3.9/lib/python/site-packages/commodore/cli/catalog.py", line 8, in <module>
    from commodore.catalog import catalog_list, Migration
  File "/Users/tobi/Library/Python/3.9/lib/python/site-packages/commodore/catalog.py", line 17, in <module>
    from .helpers import (
  File "/Users/tobi/Library/Python/3.9/lib/python/site-packages/commodore/helpers.py", line 20, in <module>
    from kapitan import targets as kapitan_targets
  File "/Users/tobi/Library/Python/3.9/lib/python/site-packages/kapitan/targets.py", line 25, in <module>
    from kapitan.dependency_manager.base import fetch_dependencies
  File "/Users/tobi/Library/Python/3.9/lib/python/site-packages/kapitan/dependency_manager/base.py", line 19, in <module>
    from kapitan.utils import (
  File "/Users/tobi/Library/Python/3.9/lib/python/site-packages/kapitan/utils.py", line 12, in <module>
    import magic
  File "/Users/tobi/Library/Python/3.9/lib/python/site-packages/magic/__init__.py", line 209, in <module>
    libmagic = loader.load_lib()
  File "/Users/tobi/Library/Python/3.9/lib/python/site-packages/magic/loader.py", line 49, in load_lib
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation

Expected Behavior

Commodore version printed

@anothertobi anothertobi added the bug Something isn't working label Mar 13, 2023
@simu
Copy link
Member

simu commented Mar 13, 2023

IIRC @rxbn was able to fix this issue by installing libmagic via brew (see also Yelp/elastalert#1927 (comment))

@rxbn
Copy link

rxbn commented Mar 14, 2023

@anothertobi For me, it was enough to just run brew install libmagic.

@simu simu changed the title Required dependecy libmagic not present on macOS Required dependency libmagic not present on macOS Mar 16, 2023
anothertobi added a commit that referenced this issue Mar 24, 2023
anothertobi added a commit that referenced this issue Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants