Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Samtools shared library libcrypto.so.1.0.0 not found #1479

Closed
NVOostende opened this issue Aug 6, 2020 · 14 comments
Closed

[BUG] Samtools shared library libcrypto.so.1.0.0 not found #1479

NVOostende opened this issue Aug 6, 2020 · 14 comments

Comments

@NVOostende
Copy link

Short description of the problem

After updating conda and Anvio to the latest version, samtools had an issue with not finding a shared library libcrypto.so.1.0.0

anvi'o version

anvi-self-test --version

Anvi'o version ...............................: esther (v6.2)
Profile DB version ...........................: 31
Contigs DB version ...........................: 14
Pan DB version ...............................: 13
Genome data storage version ..................: 6
Auxiliary data storage version ...............: 2
Structure DB version .........................: 1

System info

Using Anvio on a cluster (Linux Redhat) and installed Anvio as follows:

conda update conda
conda create -y --name anvio-6.2 python=3.6
conda activate anvio-6.2
conda install -y -c conda-forge -c bioconda anvio==6.2
conda remove -y --force anvio-minimal
conda install -y -c bioconda -c conda-forge anvio-minimal==6.2=py_1
anvi-setup-ncbi-cogs

Detailed description of the issue

Expected samtools to convert .sam files to .bam files, however samtools was not happy:

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

(anvio-6.2) [oostende@della5 ~]$ ldd $(which samtools)
	linux-vdso.so.1 =>  (0x00007ffd303b6000)
	libz.so.1 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/libz.so.1 (0x00002b628067e000)
	libm.so.6 => /lib64/libm.so.6 (0x00002b628087f000)
	libbz2.so.1.0 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/libbz2.so.1.0 (0x00002b62806cf000)
	liblzma.so.5 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/liblzma.so.5 (0x00002b62806e3000)
	libcurl.so.4 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/libcurl.so.4 (0x00002b628070d000)
	libcrypto.so.1.0.0 => not found
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b6280b81000)
	libc.so.6 => /lib64/libc.so.6 (0x00002b6280d9d000)
	/lib64/ld-linux-x86-64.so.2 (0x00002b628065b000)
	librt.so.1 => /lib64/librt.so.1 (0x00002b628116b000)
	libnghttp2.so.14 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/./libnghttp2.so.14 (0x00002b628079e000)
	libssh2.so.1 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/./libssh2.so.1 (0x00002b62807c6000)
	libssl.so.1.1 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/./libssl.so.1.1 (0x00002b6281373000)
	libcrypto.so.1.1 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/./libcrypto.so.1.1 (0x00002b6281403000)
	libgssapi_krb5.so.2 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/./libgssapi_krb5.so.2 (0x00002b628080b000)
	libkrb5.so.3 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/./libkrb5.so.3 (0x00002b62816cf000)
	libk5crypto.so.3 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/./libk5crypto.so.3 (0x00002b628085b000)
	libcom_err.so.3 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/./libcom_err.so.3 (0x00002b62817a8000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00002b62817ae000)
	libkrb5support.so.0 => /tigress/oostende/software/anaconda2/envs/anvio-6.2/bin/../lib/././libkrb5support.so.0 (0x00002b62819b2000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00002b62819c1000)

I tried the following to no avail:

conda install -c bioconda samtools
or
conda install -c bioconda samtools openssl=1.0
@meren
Copy link
Member

meren commented Aug 6, 2020

Unfortunately this is a conda issue, and there is nothing we can do to solve it from here. But there may be some solutions / ideas here:

bioconda/bioconda-recipes#13958

If you solve it please let us know about your solution, @NVOostende. Sorry for the inconvenience.

@meren meren closed this as completed Aug 6, 2020
@NVOostende
Copy link
Author

Thank you @meren for the link to bioconda recipes!
Ran
conda install -c bioconda samtools=1.9 --force-reinstall
to update samtools to latest build, and it did the trick.

> samtools --version
samtools 1.9
Using htslib 1.9
Copyright (C) 2018 Genome Research Ltd.

samtools was happy when queried this time around.

@Chris-lad
Copy link

Thanks buddy !
I just solved my bug with this !

@BI202020
Copy link

thanks @NVOostende. it worked!

@GenomicaMicrob
Copy link

After many struggles, this worked for me:
conda config --add channels bioconda
conda config --add channels conda-forge
conda install samtools==1.11

@xiachenrui
Copy link

@NVOostende great metheds!!!

@tiagobrc
Copy link

Thank you @meren for the link to bioconda recipes!
Ran
conda install -c bioconda samtools=1.9 --force-reinstall
to update samtools to latest build, and it did the trick.

> samtools --version
samtools 1.9
Using htslib 1.9
Copyright (C) 2018 Genome Research Ltd.

samtools was happy when queried this time around.

This worked for me.

@schlogl2017
Copy link

This worked for me to install the required lib.
sudo nano /etc/apt/sources.list
add deb http://security.ubuntu.com/ubuntu bionic-security main
sudo apt update && apt-cache policy libssl1.0-dev
sudo apt-get install libssl1.0-dev

@ekiefl
Copy link
Contributor

ekiefl commented Nov 9, 2021

When following the developer installation instructions, I ran into this same error.

The command supplied in the instructions is:

conda install -y -c bioconda samtools

To solve I ran

conda uninstall -c bioconda samtools

And then

conda install -c bioconda samtools=1.9

This fixed things. I have updated the install instructions.

ekiefl added a commit to merenlab/merenlab.org that referenced this issue Nov 9, 2021
cfarkas added a commit to cfarkas/annotate_my_genomes that referenced this issue Mar 11, 2022
removing samtools from conda recipe since Ubuntu 20.04.3 presents conflicts with libcrypto: merenlab/anvio#1479
cfarkas added a commit to cfarkas/annotate_my_genomes that referenced this issue Mar 11, 2022
removing samtools from conda recipe since Ubuntu 20.04.3 presents conflicts with libcrypto: merenlab/anvio#1479
cfarkas added a commit to cfarkas/annotate_my_genomes that referenced this issue Mar 11, 2022
removing samtools from conda recipe since Ubuntu 20.04.3 presents conflicts with libcrypto: merenlab/anvio#1479
cfarkas added a commit to cfarkas/annotate_my_genomes that referenced this issue Mar 11, 2022
removing samtools from conda recipe since Ubuntu 20.04.3 presents conflicts with libcrypto: merenlab/anvio#1479
cfarkas added a commit to cfarkas/annotate_my_genomes that referenced this issue Mar 11, 2022
removing samtools from conda recipe since Ubuntu 20.04.3 presents conflicts with libcrypto: merenlab/anvio#1479
@Xuelei-Dai
Copy link

About this bug, I have found the best way to solve it without installing something, it's very easy as follows:

cd annaconda/envs/samtools/lib
ln -s libcrypto.so.1.1 libcrypto.so.1.0.0

It's OK:)

@hagen-wende
Copy link

hagen-wende commented Oct 7, 2022

This worked for me to install the required lib. sudo nano /etc/apt/sources.list add deb http://security.ubuntu.com/ubuntu bionic-security main sudo apt update && apt-cache policy libssl1.0-dev sudo apt-get install libssl1.0-dev

Thank you! this also solved the issue for me! It still was an issue with samtools 1.16.1

@cpplyqz
Copy link

cpplyqz commented Jul 9, 2023

About this bug, I have found the best way to solve it without installing something, it's very easy as follows:

cd annaconda/envs/samtools/lib
ln -s libcrypto.so.1.1 libcrypto.so.1.0.0

It's OK:)

Thank you it worked!!!

@genecell
Copy link

Great answers! I am using the snakemake workflow, so I add a local env for the samtools commands via vi envs/samtools.yaml:

name: samtools
channels:
  - bioconda
  - conda-forge
  - defaults
dependencies:
  - samtools==1.11

and in the snakemake file:

rule sortBam:
        input: "mapped/bams/{sample}.mapped.bam" 
        output: "mapped/bams/{sample}.bam"
        params:
            tempDir = TEMPDIR
        wildcard_constraints:
            sample="|".join(SAMPLES)
        conda: 'envs/samtools.yaml'
        shell: """
            samtools sort -m 10G -@ 10 {input} -T {params.tempDir} -o {output}
            """

@jessen96
Copy link

i solve this error by using this command
conda install -c bioconda samtools=1.9 --force-reinstall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests