conda安装samtools 报错

本文讲述了samtools遇到libtinfow.so.5缺失错误,通过检查依赖并发现由于conda不同channel间的openssl版本冲突。提供了解决方案,包括软链接和调整conda配置,确保正确链接openssl 1.0.x版本以运行samtools 1.9。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考文档:
link1写的很棒
link2

error:

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

通过ldd查看samtools依赖了哪些工具。

$ ldd `which samtools`
        linux-vdso.so.1 =>  (0x00007ffdd0950000)
        libz.so.1 => /home/hjb_usr04/anaconda3/bin/../lib/libz.so.1 (0x00007f0885979000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f0885477000)
        libbz2.so.1.0 => /home/hjb_usr04/anaconda3/bin/../lib/libbz2.so.1.0 (0x00007f088595f000)
        liblzma.so.5 => /home/hjb_usr04/anaconda3/bin/../lib/liblzma.so.5 (0x00007f0885936000)
        libcurl.so.4 => /home/hjb_usr04/anaconda3/bin/../lib/libcurl.so.4 (0x00007f08858ac000)
        libcrypto.so.1.0.0 => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f088525b000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f0884e8d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0885779000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f0884c85000)
        libssh2.so.1 => /home/hjb_usr04/anaconda3/bin/../lib/./libssh2.so.1 (0x00007f0885867000)
        libssl.so.1.1 => /home/hjb_usr04/anaconda3/bin/../lib/./libssl.so.1.1 (0x00007f08857d7000)
        libcrypto.so.1.1 => /home/hjb_usr04/anaconda3/bin/../lib/./libcrypto.so.1.1 (0x00007f08849b9000)
        libgssapi_krb5.so.2 => /home/hjb_usr04/anaconda3/bin/../lib/./libgssapi_krb5.so.2 (0x00007f0884966000)
        libkrb5.so.3 => /home/hjb_usr04/anaconda3/bin/../lib/./libkrb5.so.3 (0x00007f0884893000)
        libk5crypto.so.3 => /home/hjb_usr04/anaconda3/bin/../lib/./libk5crypto.so.3 (0x00007f08857bc000)
        libcom_err.so.3 => /home/hjb_usr04/anaconda3/bin/../lib/./libcom_err.so.3 (0x00007f08857b5000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f088468f000)
        libkrb5support.so.0 => /home/hjb_usr04/anaconda3/bin/../lib/././libkrb5support.so.0 (0x00007f08857a5000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f0884475000)

conda的各个channel之间冲突, 因此修改~/.condarc提高conda-forge的优先级

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - defaults
show_channel_urls:true

可用方法:

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
cd ./anaconda3/lib/
ll libcry*
ln -s libcrypto.so.1.1 libcrypto.so.1.0.0

OK


??conda install -c bioconda samtools openssl=1.0不起作用?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值