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

libarchive Apple Silicon M1 #87

Open
charlesdedampierre opened this issue Mar 26, 2022 · 1 comment
Open

libarchive Apple Silicon M1 #87

charlesdedampierre opened this issue Mar 26, 2022 · 1 comment

Comments

@charlesdedampierre
Copy link

Bonjour,

Je rencontre des problèmes avec libarchive sur mac silicon M1, j'obtiens l"erreur suivante, des idées ?

Traceback (most recent call last):
File "/Users/perso/opt/anaconda3/lib/python3.9/site-packages/libarchive/ffi.py", line 55, in
libarchive = ctypes.cdll.LoadLibrary(libarchive_path)
File "/Users/perso/opt/anaconda3/lib/python3.9/ctypes/init.py", line 460, in LoadLibrary
return self._dlltype(name)
File "/Users/perso/opt/anaconda3/lib/python3.9/ctypes/init.py", line 382, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/opt/homebrew/Cellar/libarchive/3.6.0/lib/libarchive.13.dylib, 0x0006): tried: '/opt/homebrew/Cellar/libarchive/3.6.0/lib/libarchive.13.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libarchive.13.dylib' (no such file), '/usr/lib/libarchive.13.dylib' (no such file)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/perso/opt/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/perso/opt/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/perso/Desktop/Personal Projects/Law/legi.py/legi/tar2sqlite.py", line 12, in
import libarchive
File "/Users/perso/opt/anaconda3/lib/python3.9/site-packages/libarchive/init.py", line 1, in
from .entry import ArchiveEntry
File "/Users/perso/opt/anaconda3/lib/python3.9/site-packages/libarchive/entry.py", line 6, in
from . import ffi
File "/Users/perso/opt/anaconda3/lib/python3.9/site-packages/libarchive/ffi.py", line 57, in
raise ImportError("Failed to load libarchive library from %s - are any dependencies missing?"
ImportError: Failed to load libarchive library from %s - are any dependencies missing?Is your environment activated?

Merci pour le travail,

Charles

@Changaco
Copy link
Member

Le message d'erreur dit qu'il y a incompatibilité entre libarchive qui est compilé pour l'architecture M1 (arm64) et python qui est compilé pour Intel (x86_64). La solution est de réinstaller python afin d'obtenir une version compilée pour M1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants