This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bcftools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

Hello,

I have samtools version 1.12 h9aed4be_1 bioconda

I have installed bcftools version 1.8 h4da6232_3 bioconda

and when I try to run bcftools I get :

bcftools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

My channels order is:

conda config --show channels
channels:
  - conda-forge
  - bioconda
  - defaults
  - nvidia

What can I do?

bcftools

what does

ldconfig -p | grep libcrypto

tell you?

ldconfig -p | grep libcrypto

libcrypto.so.10 (libc6,x86-64) => /lib64/libcrypto.so.10
libcrypto.so.1.1 (libc6,x86-64) => /lib64/libcrypto.so.1.1
libcrypto.so (libc6,x86-64) => /lib64/libcrypto.so

I am working with a remote server of the university so I don't have the option to use sudo apt .. I usually use conda install

I tried conda install -c anaconda openssl

I have a similar issue, except my error is

bcftools: error while loading shared libraries: libgsl.so.25: cannot open shared object file: No such file or directory

I use mamba. I created an environment:

mamba create --name gwas python=3.8

Then I did this:

mamba activate gwas
mamba install bcftools vcftools tabix polars pandas numpy sckit-learn

When I try out bcftools I get the error.

(gwas) [user@hpc]$ bcftools
bcftools: error while loading shared libraries: libgsl.so.25: cannot open shared object file: No such file or directory

Based on this comment, I am thinking I need to compile it from source instead of through mamba. Is this true, is there an easier way?

This should not have been an answer, so I've moved it to a comment.

Ah, if you do mamba install -c conda-forge bcftools vcftools tabix polars pandas numpy scikit-learn gsl==2.5, it will force mamba to install the older version of bcftools (v1.10) - that's a downside, but I only need to convert some files.

5 answers

I can't believe this never bit me, this bug has quite a discussion on github, this comment might have a solution for you:

conda install -c bioconda samtools openssl=1.0

Otherwise you might be able to link the newer library to the older version, as suggested a bit earlier in above linked discussion

Nice find. There is also mamba, which is both (much) faster than conda and more adept at resolving conflicts like this. It often resolves many conda issues out of the box.

Yes, I am familiar with this discussion and I have tried all the suggestions mentioned there. The only thing that helped me is to create a new environment and reinstall everything ..

conda install -c bioconda openssl=1.0 was the fastest fix for me - thanks!

Is there a reason you are using bcftools 1.8 from three years ago?

If you install samtools and bcftools afresh today:

conda create -n sambcfenv samtools bcftools

then you get up to date versions of samtools and bcftools (1.13, released last week) with fewer bugs and more features. They have been built recently with the current conda packages and are free from this libcrypto problem, which is a thing of the past.

Thank you!! I just created a new environment and it works :)

Hi, I am also running into this issue now, but for some reason, even this doesn't seem to fix it anymore. When I create a new environment with just bcftools, then bcftools works (but it's still version 1.8; I won't upgrade to 1.13). But when I create a new environment just like you said, it still gives me this libcrypto problem. I can create a separate environment for every step in my pipeline, but for now, I prefer for it all to be in the same environment. Any new tips that might fix this?

Any other suggestions if I do have conda-forge added (and in the correct order)?

Using mamba in place of conda solved it for me. Apparently it is time to stop using conda for anything else than conda install mamba.

Updating bcftools to 1.15.1 fixed this for me.

conda install -c bioconda -c conda-forge bcftools=1.15.1

I had this same problem today (on Fedora, btw) and removing bcftools and installing it again using mamba instead of conda fixed it:

conda remove bcftools
mamba install -c bioconda bcftools

You're probably missing libssl1.0.0. Install via sudo apt-get install libssl1.0.0 libssl-dev (on linux).

Log in to answer this question.