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

samtools 1.9 dependency pulls in wrong version of openssl #12100

Closed
jamie-arcc opened this issue Nov 15, 2018 · 48 comments
Closed

samtools 1.9 dependency pulls in wrong version of openssl #12100

jamie-arcc opened this issue Nov 15, 2018 · 48 comments

Comments

@jamie-arcc
Copy link

samtools fails to run successfully due to a mismatch in library versions. The samtools executable is expecting libcrypto.so.1.0.0 but openssl 1.1.1 is getting installed, which has libcrypto.so.1.1.1.

[jschnaitter@emgnt1 ~]$ conda create -n test-samtools samtools
Solving environment: done

## Package Plan ##

  environment location: /apps/anaconda/anaconda3-5.3.0/envs/test-samtools

  added / updated specs:
    - samtools


The following NEW packages will be INSTALLED:

    bzip2:           1.0.6-h14c3975_5
    ca-certificates: 2018.03.07-0
    curl:            7.62.0-hbc83047_0
    libcurl:         7.62.0-h20c2e04_0
    libdeflate:      1.0-h470a237_0    bioconda
    libgcc-ng:       8.2.0-hdf63c60_1
    libssh2:         1.8.0-h1ba5d50_4
    libstdcxx-ng:    8.2.0-hdf63c60_1
    ncurses:         6.1-hf484d3e_0
    openssl:         1.1.1-h7b6447c_0
    samtools:        1.9-h8ee4bcc_1    bioconda
    xz:              5.2.4-h14c3975_4
    zlib:            1.2.11-ha838bed_2

Proceed ([y]/n)?

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate test-samtools
#
# To deactivate an active environment, use
#
#     $ conda deactivate

[jschnaitter@emgnt1 ~]$ source activate test-samtools
(test-samtools) [jschnaitter@emgnt1 ~]$ samtools --version
samtools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
(test-samtools) [jschnaitter@emgnt1 ~]$ ldd $(which samtools)
	linux-vdso.so.1 =>  (0x00007ffc61dcb000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fdc81b91000)
	libz.so.1 => /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/bin/../lib/libz.so.1 (0x00007fdc81979000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fdc81677000)
	libbz2.so.1.0 => /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/bin/../lib/libbz2.so.1.0 (0x00007fdc81465000)
	liblzma.so.5 => /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/bin/../lib/liblzma.so.5 (0x00007fdc8123e000)
	libdeflate.so => /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/bin/../lib/libdeflate.so (0x00007fdc81033000)
	libcurl.so.4 => /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/bin/../lib/libcurl.so.4 (0x00007fdc80fba000)
	libcrypto.so.1.0.0 => not found
	libncursesw.so.6 => /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/bin/../lib/libncursesw.so.6 (0x00007fdc80d80000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fdc809bd000)
	libtinfow.so.6 => /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/bin/../lib/libtinfow.so.6 (0x00007fdc80781000)
	/lib64/ld-linux-x86-64.so.2 (0x000055c80fe9e000)
	librt.so.1 => /lib64/librt.so.1 (0x00007fdc80579000)
	libssl.so.1.1 => /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/bin/../lib/./libssl.so.1.1 (0x00007fdc804e0000)
	libcrypto.so.1.1 => /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/bin/../lib/./libcrypto.so.1.1 (0x00007fdc801e7000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fdc7ffe2000)
(test-samtools) [jschnaitter@emgnt1 ~]$ ls -l /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/lib/libcrypto*
-rw-rw-r-- 1 jschnaitter pi.arcc 5721646 11月 15 17:11 /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/lib/libcrypto.a
lrwxrwxrwx 1 jschnaitter pi.arcc      16 11月 15 17:11 /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/lib/libcrypto.so -> libcrypto.so.1.1
-rwxrwxr-x 1 jschnaitter pi.arcc 3459120 11月 15 17:11 /apps/anaconda/anaconda3-5.3.0/envs/test-samtools/lib/libcrypto.so.1.1
(test-samtools) [jschnaitter@emgnt1 ~]$ conda list
# packages in environment at /apps/anaconda/anaconda3-5.3.0/envs/test-samtools:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.6                h14c3975_5
ca-certificates           2018.03.07                    0
curl                      7.62.0               hbc83047_0
libcurl                   7.62.0               h20c2e04_0
libdeflate                1.0                  h470a237_0    bioconda
libgcc-ng                 8.2.0                hdf63c60_1
libssh2                   1.8.0                h1ba5d50_4
libstdcxx-ng              8.2.0                hdf63c60_1
ncurses                   6.1                  hf484d3e_0
openssl                   1.1.1                h7b6447c_0
samtools                  1.9                  h8ee4bcc_1    bioconda
xz                        5.2.4                h14c3975_4
zlib                      1.2.11               ha838bed_2
(test-samtools) [jschnaitter@emgnt1 ~]$ cat /apps/anaconda/anaconda3-5.3.0/.condarc
envs_dirs:
  - ~/my-envs
  - /apps/anaconda/anaconda3-5.3.0/envs

channels:
  - defaults
  - bioconda
  - conda-forge
@jamie-arcc
Copy link
Author

turns out that I had the channels in the wrong order. That will probably fix it

@tobsecret
Copy link

I am having this exact same issue - how did you solve it precisely?

@jamie-arcc
Copy link
Author

I am having this exact same issue - how did you solve it precisely?

I had put the channels into my .condarc manually, and they ended up being in the wrong order. I removed them from the file and then followed the instructions on the bioconda page. Now they are in my file as follows:

channels:
  - conda-forge
  - bioconda
  - defaults

@tobsecret
Copy link

Thanks a bunch, that worked!

@cfljam
Copy link

cfljam commented Dec 21, 2018

This also worked for me after the same problems with https://bioconda.github.io/recipes/angsd. Many thanks!

@zyllifeworld
Copy link

zyllifeworld commented Dec 28, 2018

This is because the samtools 1.9 depends on openssl 1.0.x (I hope the next version will support or just change the shared library name) and openssl 1.1.x was installed,if you must keep the openssl 1.1.x version, a possible solution is :

  1. move to the /*Your_Path_of_conda/lib (for me ~/anaconda3/lib/) folder
  2. give a soft link of "libcrypto.so.1.1" named "libcrypto.so.1.0.0" to cheat on the samtools

ln -s libcrypto.so.1.1 libcrypto.so.1.0.0

@leipzig
Copy link
Contributor

leipzig commented Feb 6, 2019

This has just recently crept back up for me even with channels in the correct order. Can someone post a working Debian Stretch Dockerfile with Bioconda Samtools?

@leipzig leipzig reopened this Feb 6, 2019
@bgruening
Copy link
Member

@leipzig not debian but a container: https://quay.io/repository/biocontainers/samtools?tag=latest&tab=tags

Does this help?

@cdiener
Copy link
Contributor

cdiener commented Feb 6, 2019

So for me it did creep up when setting channels via the commandline using conda install -c where it would pull in the wrong openssl version even when specifying channels in the correct order. However, changing the .condarc channel order did work.

@hdetering
Copy link
Contributor

For me, changing the channel order did not help. But I was able to solve the problem by explicitly downgrading openssl:

conda install -c bioconda samtools openssl=1.0

@leipzig
Copy link
Contributor

leipzig commented Feb 7, 2019

Here is a Dockerfile that works using @hdetering recipe:

FROM continuumio/miniconda3:4.5.12

RUN conda update -n base -c defaults conda

RUN conda config --add channels defaults
RUN conda config --add channels bioconda
RUN conda config --add channels conda-forge

RUN conda install -c bioconda -y samtools
RUN conda install openssl=1.0

@Amz965
Copy link

Amz965 commented Feb 14, 2019

Just download an old version openssl and copy the libcrypto.so.1.0.0 to the lib file. It's work for me.

@thkitapci
Copy link

For me, changing the channel order did not help. But I was able to solve the problem by explicitly downgrading openssl:

conda install -c bioconda samtools openssl=1.0

This fixed the issue for me. I hope there will be a better permanent solution soon rather than downgrading openssl

@bvaisvil
Copy link

I had a very similar issue with DESeq2 which had a depends upon GenomeInfoDb which depended up RCurl which linked to libssl.so.1.0.0:

Error: package or namespace load failed for ‘GenomeInfoDb’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/opt/conda/lib/R/library/RCurl/libs/RCurl.so':
  libssl.so.1.0.0: cannot open shared object file: No such file or directory

Downgrading to openssl 1.0 fixed the issue for me as well.

conda install -c bioconda r-rcurl openssl=1.0

Thanks, @hdetering !

@ralonso-igenomix
Copy link

Hello,

same problem solved with @leipzig solution

Thanks!

@patrickturko
Copy link

patrickturko commented Mar 5, 2019

EDIT: I was pulling an old Docker image by mistake instead of my updated image. Installing openssl v1.0 did indeed fix this problem.


I'm having this problem. I've tried explicitly downgrading openssl to version 1.0, but the same error appears.


RUN conda config --add channels defaults
RUN conda config --add channels bioconda
RUN conda config --add channels conda-forge

RUN conda install -c bioconda -y samtools
RUN conda install openssl=1.0

I've also tried installing them in the same command:

RUN conda install samtools openssl=1.0

As well as downgrading samtools itself:

RUN conda install samtools=1.8 openssl=1.0

Nevertheless I get the same error every time:

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

Any more ideas?

@leipzig
Copy link
Contributor

leipzig commented Mar 5, 2019

Sorry, did you run this in Docker? What base image did you choose?

@ralonso-igenomix
Copy link

@patrickturko this is my recipe in singularity and it works:

BootStrap: docker
From: continuumio/miniconda3

%setup

mkdir -p ${SINGULARITY_ROOTFS}/users

%post

export PATH=/opt/conda/bin:$PATH


# make sure to have the latest conda version
conda update -n base -c defaults conda

# add some extra channels
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --add channels pkgs/r


# install some bioinfo tools from Bioconda
conda install -c bioconda -y samtools
conda install openssl=1.0 # to make work bcftools and samtools 

export PATH=/opt/conda/bin:$PATH

%environment
export PATH=/opt/conda/bin:$PATH

@patrickturko
Copy link

@leipzig yes, this is in Docker, but actually I was mistaken about the bug. See my edit.

@unode
Copy link
Member

unode commented Mar 5, 2019

In case you missed it, can you try the same commands you were using initially (without the workarounds?). If #13909 is correct the problem should no longer occur.

@c-mertes
Copy link
Contributor

c-mertes commented Aug 3, 2020

This old bug also popped up on our side. And I'm not sure how to fix this from the maintainer viewpoint. We have the drop package which depends on samtools>=1.7. When installing drop it pulls samtools=1.7 and openssl 1.1.1g that are not compatible.

conda create --override-channels -c conda-forge -c bioconda -c defaults -n drop-bug1 drop

This should not be past to the end-user as @pb-cdunn already said. Should we as a package maintainer then rather fix the version numbers in our recipes or is there another place we as a maintainer can ensure the correct versions are installed?

@dpryan79
Copy link
Contributor

dpryan79 commented Aug 4, 2020

This is not something that can be fixed without switching to mamba. The conda solver provides incorrect solutions in a number of cases, for which this is an example.

@roryk
Copy link
Contributor

roryk commented Aug 4, 2020

Thank you so much Devon.

@vragh
Copy link

vragh commented Aug 10, 2020

This problem seems to keep cropping up.

I upgraded my Trinity conda installation, and samtools broke because of libcrypto.so.1.1.1 getting installed instead of libcrypto.so.1.0.0. I tried everything listed here, but the only solution that worked was to copy over libcrypto.so.1.0.0 from elsewhere and place it in the /your-conda-path/envs/your-env/lib directory as suggested by @Simon6089. In my case, I simply copied over the copy from /usr/lib/ (/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0) on an Ubuntu machine into /your-conda-path/envs/your-env/lib. (You can check with ldd $(which samtools) and it should no longer indicate libcrypto.so.1.0.0 => not found but show libcrypto.so.1.0.0 => /your-conda-path/envs/your-env/lib/libcrypto.so.1.0.0) instead.

Just download an old version openssl and copy the libcrypto.so.1.0.0 to the lib file. It's work for me.

So, if you're arriving here because your Trinity install broke, try this first.

nuwang added a commit to nuwang/bioconda-recipes that referenced this issue Sep 24, 2020
Running the latest container for unicycler 0.4.8 fails with `Error: Unspecified error with Unicycler dependencies`.
Running the container as:
```
docker run -it quay.io/biocontainers/unicycler:0.4.8--py38h8162308_1
```
and subsequently running samtools in the container, throws the following error:
```
samtools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory.
```
Appears to be caused by: bioconda#12100

Rebuilding the container seems to work, as samtools gets updated to v1.10, which is compatible with libssl 1.1
bgruening added a commit that referenced this issue Sep 27, 2020
* Update unicycler container

Running the latest container for unicycler 0.4.8 fails with `Error: Unspecified error with Unicycler dependencies`.
Running the container as:
```
docker run -it quay.io/biocontainers/unicycler:0.4.8--py38h8162308_1
```
and subsequently running samtools in the container, throws the following error:
```
samtools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory.
```
Appears to be caused by: #12100

Rebuilding the container seems to work, as samtools gets updated to v1.10, which is compatible with libssl 1.1

* add tests

Co-authored-by: Björn Grüning <bjoern@gruenings.eu>
@QiushiLi
Copy link

QiushiLi commented Jan 15, 2021

Hi guys,

If you are still suffering from the env related issue of falcon, maybe you would like to try this frozen environment of mine, which works well through 2-asm stage.

Simply unzip "pb-assembly.yml.zip", then
conda env create -f pb-assembly.yml

The order of the channel is very important. Please do not change the order unless you have a clear reason.
My conda version is 4.9.2
pb-assembly.yml.zip

@bio-informatician
Copy link

If you are using a conda env, simply use

conda install -c bioconda samtools openssl=1.0

@VitaminBrad
Copy link

If you are using a conda env, simply use

conda install -c bioconda samtools openssl=1.0

Attempting this produced this error for me:

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package zlib conflicts for:
samtools -> curl[version='>=7.59.0,<8.0a0'] -> zlib[version='1.2.|1.2.11']
samtools -> zlib[version='1.2.11.
|>=1.2.11,<1.3.0a0|1.2.8.*|1.2.8']

Package openssl conflicts for:
openssl=1.0
python=3.7.10 -> openssl[version='>=1.1.1j,<1.1.2a|>=1.1.1k,<1.1.2a']

Package bzip2 conflicts for:
samtools -> bzip2[version='1.0.*|>=1.0.6,<2.0a0|>=1.0.8,<2.0a0']
python=3.7.10 -> pypy3.7=7.3.5 -> bzip2[version='>=1.0.8,<2.0a0']The following specifications were found to be incompatible with your system:

  • feature:/linux-64::__glibc==2.28=0
  • feature:|@/linux-64::__glibc==2.28=0
  • openssl=1.0 -> libgcc-ng[version='>=7.3.0'] -> __glibc[version='>=2.17']
  • python=3.7.10 -> libgcc-ng[version='>=9.3.0'] -> __glibc[version='>=2.17']

This is the first time I've ever seen a message like this... Any explanation or workaround would be greatly appreciated.

Thanks in advance!

@VitaminBrad
Copy link

This solved it for me.

In short, I (running Bismark in an AWS' Sagemaker Linux environment) ran
conda install "samtools>=1.10"
(exactly as typed above)

and it fixed the dependencies.

@PilarLF
Copy link

PilarLF commented Feb 23, 2022

Just download an old version openssl and copy the libcrypto.so.1.0.0 to the lib file. It's work for me.

HOWWWW????? pls

@PilarLF

This comment was marked as outdated.

@bgruening
Copy link
Member

@PilarLF please check your conda channel order. https://bioconda.github.io/user/install.html#set-up-channels

@PilarLF
Copy link

PilarLF commented Feb 23, 2022

i've already change it:
--add channels 'defaults' # lowest priority
--add channels 'bioconda'
--add channels 'conda-forge' # highest priority

@dpryan79
Copy link
Contributor

In general all releases starting with samtools 1.10 should have the appropriate pinnings and therefore pull in the correct openssl version. We have no other way to fix this until Anaconda finally hopefully someday enables repodata patching for our project.

@bgruening
Copy link
Member

You can try: conda create -n my_cool_env -c conda-forge -c bioconda samtools=1.9 openssl=1.0 if you really need this version.

@PilarLF
Copy link

PilarLF commented Feb 24, 2022

thank you for your quick reply!! I''ve tried all suggestions but it keeps failling :c now this is personal

@PilarLF
Copy link

PilarLF commented Feb 24, 2022

This is because the samtools 1.9 depends on openssl 1.0.x (I hope the next version will support or just change the shared library name) and openssl 1.1.x was installed,if you must keep the openssl 1.1.x version, a possible solution is :

1. move to the /*Your_Path_of_conda/lib (for me ~/anaconda3/lib/) folder

2. give a soft link of "libcrypto.so.1.1" named "libcrypto.so.1.0.0" to cheat on the samtools

ln -s libcrypto.so.1.1 libcrypto.so.1.0.0

After trying all suggestions, only this seems to work for me!! thank you very much

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