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

发布时间 2023-07-31 21:45:53作者: 小鲨鱼2018

 

001、使用conda安装bcftools, 调用报错如下:

[root@PC1 ~]# conda install bcftools -c bioconda      ## conda安装
[root@PC1 ~]# bcftools                                ## 调用测试

 

002、解决方法1

[root@PC1 ~]# conda remove bcftools -y       ## 卸载已安装bcftools
[root@PC1 ~]# conda install -c bioconda -c conda-forge bcftools=1.15.1 -y    ## 指定版本安装

 

003、测试bcftolls

[root@PC1 ~]# bcftools --version           ## 可以正常调用
bcftools 1.15.1
Using htslib 1.16
Copyright (C) 2022 Genome Research Ltd.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

 

004、解决方法2

a、

[root@PC1 ~]# bcftools    ## 调用测试
bcftools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

 

b、

[root@PC1 ~]# find ~ -name "libcrypto.so*"      ## 查找文件位置
/root/anaconda3/pkgs/openssl-1.1.1t-h7f8727e_0/lib/libcrypto.so
/root/anaconda3/pkgs/openssl-1.1.1t-h7f8727e_0/lib/libcrypto.so.1.1
/root/anaconda3/pkgs/openssl-1.1.1u-h7f8727e_0/lib/libcrypto.so
/root/anaconda3/pkgs/openssl-1.1.1u-h7f8727e_0/lib/libcrypto.so.1.1
/root/anaconda3/lib/libcrypto.so
/root/anaconda3/lib/libcrypto.so.1.1                    ## 建立软链接
[root@PC1 ~]# ln -s /root/anaconda3/lib/libcrypto.so.1.1 /root/anaconda3/lib/libcrypto.so.1.0.0
[root@PC1 ~]# find ~ -name "libcrypto.so*"     ## 再次查找, 软链接建立成功
/root/anaconda3/pkgs/openssl-1.1.1t-h7f8727e_0/lib/libcrypto.so
/root/anaconda3/pkgs/openssl-1.1.1t-h7f8727e_0/lib/libcrypto.so.1.1
/root/anaconda3/pkgs/openssl-1.1.1u-h7f8727e_0/lib/libcrypto.so
/root/anaconda3/pkgs/openssl-1.1.1u-h7f8727e_0/lib/libcrypto.so.1.1
/root/anaconda3/lib/libcrypto.so.1.0.0
/root/anaconda3/lib/libcrypto.so
/root/anaconda3/lib/libcrypto.so.1.1

 

c、调用bcftools测试

[root@PC1 ~]# bcftools --version       ## 测试版本
bcftools 1.8
Using htslib 1.8
Copyright (C) 2016 Genome Research Ltd.
License Expat: The MIT/Expat license
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

 

参考:

01、https://blog.csdn.net/weixin_54434521/article/details/130957399

02、https://zhuanlan.zhihu.com/p/611978962