Reputation: 2563
After conda update, I am getting the error below after running $ conda
, even after setting the solver to classic (using conda config --set solver classic
):
Error while loading conda entry point: conda-libmamba-solver (libarchive.so.19: cannot open shared object file: No such file or directory)
I have conda 23.11.0.
On Github there is an issue https://github.com/conda/conda-libmamba-solver/issues/283 in which they mention that if libarchive
and libmamba
come from the same channel, it should be solved.
But when I reinstall libarchive
using channel main
, it doesn't update.
Does anyone know how to solve this? I do not want to reinstall Conda from scratch.
Similar links online that do not solve the problem:
Upvotes: 29
Views: 73877
Reputation: 93
This is what works for me. My approach is very similar to that of @anestis zlatkos. In a bare terminal, without activating any conda env, first specify the conda solver
conda config --set solver classic
second update conda
conda update -n base -c defaults conda
third reopen a bare terminal and try
conda activate base
The error should be gone.
Upvotes: 0
Reputation: 844
Turns out I need to update libarchive to solve this problem:
$ conda update --all --solver=classic
in case my package list helps:
$ conda update --all --solver=classic
Error while loading conda entry point: conda-libmamba-solver (libarchive.so.19: cannot open shared object file: No such file or directory)
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: ~/miniconda3
The following packages will be downloaded:
package | build
---------------------------|-----------------
conda-24.9.2 | py39h06a4308_0 910 KB
conda-package-handling-2.4.0| py39h06a4308_0 272 KB
conda-package-streaming-0.11.0| py39h06a4308_0 30 KB
libmamba-1.5.8 | hfe524e5_3 1.8 MB
libmambapy-1.5.8 | py39h2dafd23_3 333 KB
menuinst-2.2.0 | py39h06a4308_0 225 KB
python-3.9.20 | he870216_1 25.1 MB
requests-2.32.3 | py39h06a4308_1 99 KB
ruamel.yaml-0.18.6 | py39h5eee18b_0 202 KB
ruamel.yaml.clib-0.2.8 | py39h5eee18b_0 158 KB
setuptools-75.1.0 | py39h06a4308_0 1.7 MB
tqdm-4.66.5 | py39h2f386ee_0 133 KB
urllib3-2.2.3 | py39h06a4308_0 180 KB
wheel-0.44.0 | py39h06a4308_0 108 KB
zstandard-0.23.0 | py39h2c38b39_1 431 KB
------------------------------------------------------------
Total: 31.7 MB
The following NEW packages will be INSTALLED:
py-boost pkgs/main/linux-64::py-boost-1.82.0-py39h3c18c91_2
The following packages will be REMOVED:
keyutils-1.6.1-h166bdaf_0
libblas-3.9.0-25_linux64_openblas
libboost-devel-1.85.0-h00ab1b0_4
libboost-headers-1.85.0-ha770c72_4
libboost-python-1.85.0-py39h1eb36c5_4
libboost-python-devel-1.85.0-py39he8689d4_4
libcblas-3.9.0-25_linux64_openblas
libexpat-2.6.2-h59595ed_0
libgfortran-14.2.0-h69a702a_1
libgfortran5-14.2.0-hd5240d6_1
libiconv-1.17-hd590300_2
liblapack-3.9.0-25_linux64_openblas
libnsl-2.0.1-hd590300_0
libopenblas-0.3.28-pthreads_h94d23a6_1
libsqlite-3.46.0-hde9e2c9_0
libuuid-2.38.1-h0b41bf4_0
libxcrypt-4.4.36-hd590300_1
libzlib-1.3.1-hb9d3cd8_2
lzo-2.10-hd590300_1001
numpy-2.0.2-py39h9cb892a_0
python_abi-3.9-2_cp39
The following packages will be UPDATED:
cffi 1.16.0-py39h5eee18b_1 --> 1.17.1-py39h1fdaa30_0
conda-package-han~ 2.3.0-py39h06a4308_0 --> 2.4.0-py39h06a4308_0
conda-package-str~ 0.10.0-py39h06a4308_0 --> 0.11.0-py39h06a4308_0
cryptography 42.0.5-py39hdda0065_1 --> 43.0.3-py39hdda0065_0
expat 2.6.2-h6a678d5_0 --> 2.6.3-h6a678d5_0
libarchive conda-forge::libarchive-3.6.2-h039dbb~ --> pkgs/main::libarchive-3.7.4-hfab0078_0
libcurl conda-forge::libcurl-8.8.0-hca28451_1 --> pkgs/main::libcurl-8.9.1-h251f7ec_0
libmamba 1.5.8-hfe524e5_2 --> 1.5.8-hfe524e5_3
libmambapy 1.5.8-py39h2dafd23_2 --> 1.5.8-py39h2dafd23_3
menuinst 2.1.2-py39h06a4308_0 --> 2.2.0-py39h06a4308_0
python conda-forge::python-3.9.19-h0755675_0~ --> pkgs/main::python-3.9.20-he870216_1
requests 2.32.3-py39h06a4308_0 --> 2.32.3-py39h06a4308_1
ruamel.yaml 0.17.21-py39h5eee18b_0 --> 0.18.6-py39h5eee18b_0
ruamel.yaml.clib 0.2.6-py39h5eee18b_1 --> 0.2.8-py39h5eee18b_0
setuptools 72.1.0-py39h06a4308_0 --> 75.1.0-py39h06a4308_0
tk conda-forge::tk-8.6.13-noxft_h4845f30~ --> pkgs/main::tk-8.6.14-h39e8969_0
tqdm 4.66.4-py39h2f386ee_0 --> 4.66.5-py39h2f386ee_0
tzdata 2024a-h04d1e81_0 --> 2024b-h04d1e81_0
urllib3 2.2.2-py39h06a4308_0 --> 2.2.3-py39h06a4308_0
wheel 0.43.0-py39h06a4308_0 --> 0.44.0-py39h06a4308_0
zstandard 0.19.0-py39h5eee18b_0 --> 0.23.0-py39h2c38b39_1
The following packages will be SUPERSEDED by a higher-priority channel:
binutils_impl_lin~ conda-forge::binutils_impl_linux-64-2~ --> pkgs/main::binutils_impl_linux-64-2.40-h5293946_0
boost conda-forge::boost-1.85.0-he8689d4_4 --> pkgs/main::boost-1.82.0-py39h06a4308_2
c-ares conda-forge::c-ares-1.33.1-heb4867d_0 --> pkgs/main::c-ares-1.19.1-h5eee18b_0
ca-certificates main --> pkgs/main
certifi main --> pkgs/main
cmake conda-forge::cmake-3.29.4-h91dbaaa_0 --> pkgs/main::cmake-3.26.4-h96355d8_0
conda main --> pkgs/main
icu conda-forge::icu-75.1-he02047a_0 --> pkgs/main::icu-73.1-h6a678d5_0
krb5 conda-forge::krb5-1.21.3-h659f571_0 --> pkgs/main::krb5-1.20.1-h143b758_1
ld_impl_linux-64 conda-forge::ld_impl_linux-64-2.40-hf~ --> pkgs/main::ld_impl_linux-64-2.40-h12ee557_0
libboost conda-forge::libboost-1.85.0-h0ccab89~ --> pkgs/main::libboost-1.82.0-h109eef0_2
libnghttp2 conda-forge::libnghttp2-1.58.0-h47da7~ --> pkgs/main::libnghttp2-1.57.0-h2d74bed_0
libsolv conda-forge::libsolv-0.7.30-h3509ff9_0 --> pkgs/main::libsolv-0.7.24-he621ea3_1
libssh2 conda-forge::libssh2-1.11.0-h0841786_0 --> pkgs/main::libssh2-1.11.0-h251f7ec_0
libuv conda-forge::libuv-1.48.0-hd590300_0 --> pkgs/main::libuv-1.48.0-h5eee18b_0
libxml2 conda-forge::libxml2-2.13.4-hb346dea_2 --> pkgs/main::libxml2-2.13.1-hfdd30dd_2
ncurses conda-forge::ncurses-6.5-h59595ed_0 --> pkgs/main::ncurses-6.4-h6a678d5_0
openssl conda-forge::openssl-3.3.2-hb9d3cd8_0 --> pkgs/main::openssl-3.0.15-h5eee18b_0
pcre2 conda-forge::pcre2-10.44-hba22ea6_2 --> pkgs/main::pcre2-10.42-hebb0a14_1
rhash conda-forge::rhash-1.4.4-hd590300_0 --> pkgs/main::rhash-1.4.3-hdbd6064_0
sqlite conda-forge::sqlite-3.46.0-h6d4b2fc_0 --> pkgs/main::sqlite-3.45.3-h5eee18b_0
zlib conda-forge::zlib-1.3.1-hb9d3cd8_2 --> pkgs/main::zlib-1.2.13-h5eee18b_1
zstd conda-forge::zstd-1.5.6-ha6fb4c9_0 --> pkgs/main::zstd-1.5.6-hc292b87_0
Proceed ([y]/n)? y
Downloading and Extracting Packages:
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
The problem goes away:
$ conda list | grep libarchive
libarchive 3.7.4 hfab0078_0
Upvotes: 1
Reputation: 11
If even typing command conda
in your terminal will trigger the error message:
Error while loading conda entry point: conda-libmamba-solver (libarchive.so.20: cannot open shared object file: No such file or directory)
1, Check if you have libachive.so.20 file in your computer:
locate libachive.so.20
or
find / -name libachive.so.20 2>/dev/null
2, If you have it, add the path to the file to LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=<path_to_your_so_file>:$LD_LIBRARY_PATH
3, Reinstall libarchive:
conda install --force-reinstall conda-libmamba-solver
Then you should be good to go. This solves my issue and I hope adding the path to the so file to LD_LIBRARY_PATH temporarily and then installing the conda-libmamba-solver will also solve your problem!
Upvotes: 0
Reputation: 1
Fix for Missing libarchive.19.dylib in Conda Environment on macOS
I recently ran into this annoying error with Conda on my M1 Mac (M2 Max), and after some searching and trial-and-error, I managed to fix it. I tried the solutions above, but they didn't work for me. I figured I’d share my experience in case it helps someone else. macOS Error Example:
Error while loading conda entry point: conda-libmamba-solver (dlopen(/opt/anaconda3/lib/python3.12/site-packages/libmambapy/bindings.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/libarchive.19.dylib
Referenced from: /opt/anaconda3/lib/libmamba.2.0.0.dylib Reason: tried: '/opt/anaconda3/lib/libarchive.19.dylib' (no such file), ...
Linux Error Example:
Error while loading conda entry point: conda-libmamba-solver (libmamba.so: cannot open shared object file: No such file or directory)
libarchive.19.so: cannot open shared object file: No such file or directory
How I Fixed It:
Turns out that libarchive.19 (either .dylib on macOS or .so on Linux) was missing from my environment, and Conda really needed it. Here’s what worked for me:
macOS Steps
1. Locate an Existing Version: • I used Spotlight Search (or you could use the find command in the terminal) to locate all versions of libarchive on my system. In my case, I found a version called libarchive.13.dylib in /miniconda3/lib/.
Alternatively, a symlink might work for you. (It didn't for me):
ln -s /miniconda3/lib/libarchive.13.dylib /miniconda3/lib/libarchive.19.dylib
For Linux: This solution might work for Linux as well. Find your libarchive.so.* (whatever version you have) in miniconda3/lib/ and rename it to the version that conda is looking for.
For example, if it is looking for libarchive.so.19 and you have libarchive.so.13 in miniconda3/lib/, rename the file to libarchive.so.19
After doing this, Conda started working again, and I didn’t face any more issues with the libmamba solver. Hopefully, this helps anyone else who finds themselves in the same frustrating spot!
Let me know if you have any questions or if this helps you out!
Upvotes: 0
Reputation: 1
I got similar error. please try these two lines one by one:
sudo apt-get install libarchive13
conda install mamba -c conda-forge --force-reinstall -y
https://github.com/djunsheep/bugdebugrecords/blob/main/bug.conda-libmamba-solver.md
tell me if it solves btw
Upvotes: 0
Reputation: 11
I have fixed this problem like this:
At first find the libarchive.so.19
:
sudo find / -name libarchive.so.19
then i get like this:
/media/xxx/xxx/Anaconda/pkgs/libarchive-3.6.2-h6ac8c49_2/lib/libarchive.so.19
then i copy this file to /usr/lib
sudo cp /media/xxx/xxx/Anaconda/pkgs/libarchive-3.6.2-h6ac8c49_2/lib/libarchive.so.19 /usr/lib
if don't work , you can create an env:
conda create -n name python=3.12
Upvotes: 0
Reputation: 611
This works for me:
$ conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive
Eventually install the necessary packages from the same channel (conda -forge).
Upvotes: 51
Reputation: 419
I have had a similar problem on Miniconda version 24.3.0
I couldn't even set the solver to classic
.
Please refer to this issue.
At the time of writing, copying a simlink in conda_root/lib
from libarchive.so
to libarchive.so.19
removed the warning and allowed me to execute the commands that weren't allowed.
Note:
This seems to be related to a 'legacy' feature and should be removed later.
Upvotes: 0
Reputation: 142
None of the commands worked for me with the same error as in post. Following the link in this comment I found the solution by user @spyoungtech that was posted there. I will copy-paste it here:
In my case, I was running into this issue even with a fresh conda base environment (via miniconda) because, by default, libarchive is present and installed from the defaults channel. So, when I installed libmamba from conda-forge, this issue occurred due to the mismatching channels.
To fix this, when I create my environment, I make sure to remove the defaults channel then run conda update --all which will cause all packages to be from conda-forge (assuming you have no other channels configured):
# make sure conda-forge is the only channel
conda config --remove channels defaults
conda config --add channels conda-forge
# update all packages to make sure they're from conda-forge, not defaults
conda update --all
After it this issue was resolved for me.
Upvotes: 0
Reputation: 31
While I use conda list
, The error comes out: Error while loading conda entry point: conda-libmamba-solver (libarchive.so.19: cannot open shared object file: No such file or directory)
Just use conda install -n base libarchive -c main --force-reinstall --solver classic ,
My system is ubuntu16.04, minconda with py10.
Output as follows:
conda install -n base libarchive -c main --force-reinstall --solver classic
Error while loading conda entry point: conda-libmamba-solver (libarchive.so.19: cannot open shared object file: No such file or directory)
Collecting package metadata (current_repodata.json): \ WARNING conda.models.version:get_matcher(556): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.7.1.*, but conda is ignoring the .* and treating it as 1.7.1 done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 23.9.0
latest version: 24.1.2
Please update conda by running
$ conda update -n base -c https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge conda
Or to minimize the number of packages updated during conda update use
conda install conda=24.1.2
## Package Plan ##
environment location: /data1/rengaosheng/miniconda3
added / updated specs:
- libarchive
The following packages will be downloaded:
package | build
---------------------------|-----------------
ca-certificates-2023.12.12 | h06a4308_0 133 KB main
certifi-2024.2.2 | py310h06a4308_0 161 KB main
conda-23.9.0 | py310h06a4308_0 994 KB main
libarchive-3.6.2 | hb4bd9a0_1 1.6 MB main
openssl-1.1.1w | h7f8727e_0 3.8 MB main
------------------------------------------------------------
Total: 6.7 MB
The following packages will be UPDATED:
libarchive anaconda/cloud/conda-forge::libarchiv~ --> main::libarchive-3.6.2-hb4bd9a0_1
The following packages will be SUPERSEDED by a higher-priority channel:
ca-certificates anaconda/cloud/conda-forge::ca-certif~ --> main::ca-certificates-2023.12.12-h06a4308_0
certifi anaconda/cloud/conda-forge/noarch::ce~ --> main/linux-64::certifi-2024.2.2-py310h06a4308_0
conda anaconda/cloud/conda-forge::conda-23.~ --> main::conda-23.9.0-py310h06a4308_0
openssl anaconda/cloud/conda-forge::openssl-1~ --> main::openssl-1.1.1w-h7f8727e_0
Proceed ([y]/n)?
After that, everything works well. Good luck
Upvotes: 3
Reputation: 834
This error occurs after installing some packages from conda-forge
that depend on libarchive
. When you do that, the conda-forge
version of libarchive
gets you libarchive.so.13.x
, which breaks your conda install.
If this error happens in the base env, then I recommend cloning the base env to somewhere else and reinstalling, because the base env should be bare minimum conda anyway.
Otherwise, you can try finding libarchive.so.19
in ~/miniconda3/lib
or ~/miniconda3/envs/*/lib
and copying all libarchive*
files to ~/miniconda3/envs/{YOUR_BROKEN_ENV}/lib
.
This is a temp fix. As soon as you can run conda install
again, please run conda install -c main conda-mamba-solver libmamba libarchive
.
Note: libarchive conda-forge version 13.6 is equivalent to main version 19, but the naming is an open issue.
Upvotes: 5
Reputation: 376
In this specific situation, to prevent walking in circles, you better specify the solver. As suggested, use the classic one:
conda install -n base libarchive -c main --force-reinstall --solver classic
The output you are looking for looks like the following:
Error while loading conda entry point: conda-libmamba-solver (libarchive.so.19: cannot open shared object file: No such file or directory)
Collecting package metadata (current_repodata.json): / WARNING conda.models.version:get_matcher(562): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.7.1.*, but conda is ignoring the .* and treating it as 1.7.1
done
Solving environment: done
\## Package Plan ##
environment location: /home/fsouto/anaconda3
added / updated specs:
- libarchive
The following packages will be downloaded:
package | build
---------------------------|-----------------
ca-certificates-2023.12.12 | h06a4308_0 133 KB main
certifi-2024.2.2 | py311h06a4308_0 161 KB main
conda-24.1.2 | py311h06a4308_0 1.3 MB main
libarchive-3.6.2 | h6ac8c49_2 1.6 MB main
------------------------------------------------------------
Total: 3.1 MB
The following packages will be UPDATED:
libarchive conda-forge::libarchive-3.6.2-h3d5159~ --> main::libarchive-3.6.2-h6ac8c49_2
The following packages will be SUPERSEDED by a higher-priority channel:
ca-certificates conda-forge::ca-certificates-2024.2.2~ --> main::ca-certificates-2023.12.12-h06a4308_0
certifi conda-forge/noarch::certifi-2024.2.2-~ --> main/linux-64::certifi-2024.2.2-py311h06a4308_0
conda conda-forge::conda-24.1.2-py311h38be0~ --> main::conda-24.1.2-py311h06a4308_0
Proceed ([y]/n)? y
Upvotes: 16
Reputation: 21
Try to specify the solver. This will work 100% for sure.
conda install -n base conda-libmamba-solver --solver=classic
Upvotes: 2
Reputation: 97
I ended up re-installing mamba from scratch, and now everything works. I followed instructions here and here:
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh
Upvotes: 2
Reputation: 1
This has fixed it to me:
Upvotes: 0
Reputation: 11
I have found the explanation of similiar problem in conda-libmamba-solver/issues/283, and it is noted that is caused by some comflictions that will be fixed in the future. And to solve it now, you should "make sure 'libarchive' and 'libmamba' come from same channel", and my problem finally solved by re-install both packages from main channel.
Upvotes: 0
Reputation: 63
conda install -n base libarchive -c main --force-reinstall
Fixed it for me.
Upvotes: 5