Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solve conda-libmamba-solver (libarchive.so.19) error after updating conda to 23.11.0 without reinstalling conda?

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:

  • After installing libmamba solver i get `warning libmamba Could not parse state file`
  • How to Fix Entry Point Not Found while installing libraries in conda environment
  • https://www.reddit.com/r/learnpython/comments/160kjz9/how_do_i_get_anaconda_to_work_the_way_i_want_it_to/
like image 483
Homero Esmeraldo Avatar asked Aug 31 '25 22:08

Homero Esmeraldo


2 Answers

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).

like image 99
anestis zlatkos Avatar answered Sep 05 '25 07:09

anestis zlatkos


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

like image 27
Farlon Souto Avatar answered Sep 05 '25 09:09

Farlon Souto