bcftools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
5
7
Entering edit mode
3.4 years ago
Michal Nevo ▴ 140

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 • 39k views
ADD COMMENT
0
Entering edit mode

what does

ldconfig -p | grep libcrypto

tell you?

ADD REPLY
0
Entering edit mode
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

ADD REPLY
1
Entering edit mode

did you try jared.andrews07 's installation instructions?

ADD REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

I tried conda install -c anaconda openssl

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
1
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

And yes, this works too. Ok. Solved for me! Thank you all!

ADD REPLY
8
Entering edit mode
3.4 years ago
Carambakaracho ★ 3.3k

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

ADD COMMENT
2
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
6
Entering edit mode
3.4 years ago

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.

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
4
Entering edit mode

If you are getting bcftools 1.8, it's probably because you do not have the conda-forge channel added. See bioconda's channel setup instructions.

ADD REPLY
0
Entering edit mode

That was it, thank you!

ADD REPLY
0
Entering edit mode

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

ADD REPLY
2
Entering edit mode

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.

ADD REPLY
4
Entering edit mode
2.2 years ago
felixm ▴ 40

Updating bcftools to 1.15.1 fixed this for me.

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

ADD COMMENT
2
Entering edit mode
2.1 years ago
Raúl ▴ 20

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
ADD COMMENT
1
Entering edit mode
3.4 years ago

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

ADD COMMENT

Login before adding your answer.

Traffic: 1742 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6