mamba: Library not loaded: @rpath/libarchive.13.dyli on M1 Mac
Any mamba command results in the following error for me. I use a M1 Macbook and a fresh miniconda installation. Mamba was installed using conda install mamba -n base -c conda-forge.
Traceback (most recent call last):
File "/Users/kdubovikov/miniconda3/bin/mamba", line 7, in <module>
from mamba.mamba import main
File "/Users/kdubovikov/miniconda3/lib/python3.9/site-packages/mamba/mamba.py", line 53, in <module>
import mamba.mamba_api as api
ImportError: dlopen(/Users/kdubovikov/miniconda3/lib/python3.9/site-packages/mamba/mamba_api.cpython-39-darwin.so, 0x0002): Library not loaded: @rpath/libarchive.13.dylib
Referenced from: /Users/kdubovikov/miniconda3/lib/python3.9/site-packages/mamba/mamba_api.cpython-39-darwin.so
Reason: tried: '/Users/kdubovikov/miniconda3/lib/libarchive.13.dylib' (no such file), '/Users/kdubovikov/miniconda3/lib/libarchive.13.dylib' (no such file), '/Users/kdubovikov/miniconda3/libarchive.13.dylib' (no such file), '/Users/kdubovikov/miniconda3/lib/python3.9/site-packages/mamba/../../../libarchive.13.dylib' (no such file), '/Users/kdubovikov/miniconda3/lib/libarchive.13.dylib' (no such file), '/Users/kdubovikov/miniconda3/lib/libarchive.13.dylib' (no such file), '/Users/kdubovikov/miniconda3/libarchive.13.dylib' (no such file), '/Users/kdubovikov/miniconda3/lib/python3.9/site-packages/mamba/../../../libarchive.13.dylib' (no such file), '/Users/kdubovikov/miniconda3/lib/libarchive.13.dylib' (no such file), '/Users/kdubovikov/miniconda3/bin/../lib/libarchive.13.dylib' (no such file), '/Users/kdubovikov/miniconda3/lib/libarchive.13.dylib' (no such file), '/Users/kdubovikov/miniconda3/bin/../lib/libarchive.13.dylib' (no such file), '/usr/local/lib/libarchive.13.dylib' (no such file), '/usr/lib/libarchive.13.dylib' (no such file)
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 17
- Comments: 33 (6 by maintainers)
I have installed
libarchivewithconda install libarchive -n base -c conda-forgeand now everything works. Maybe mamba dependencies in conda-forge should be modified to include libarchive for Apple Silicon.i’ve experienced the same problem, and the hack proposed above works.
conda install libarchive -n base -c conda-forgeI had the same problem and tried method of @kdubovikov but the problem still exists. Then tried the answer from here and successed:
Worked for me. thanks!
Experienced the same problem, with the same solution. With the
pkgs/mainversion of libarchive 3.5.2, there’s alibarchive.18.dylibin~/miniconda3/lib, but nolibarchive.13.dylib. With theconda-forgeversion, there’s alibarchive.13.dylib, which mamba expects.I had a very similar issue on my new M2 MacBook Pro. I found that a number of conda packages were not appearing for me in
conda searcheven though I know they are distributed on bioconda. I found another thread that helped me fix that, using this command:conda config --add subdirs osx-64However, upon installing one of the desired tools, I had the same sort of “Library not loaded” as described by OP. After some frustration, I realized that there is a very simple solution. First, I noticed that my
/usr/localdirectory doesn’t contain alibsubdirectory. So I just did the following, linking my Homebrewlibto/usr/localand that seems to be working:sudo ln -s /opt/homebrew/lib/ /usr/local/libIf you’re open to trying Micromamba: it doesn’t have those kinds of problems.