• curl: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory


    001、问题

    (base) root@PC1:/home/test2# curl -O ftp://ftp.arabidopsis.org/home/tair/Genes/TAIR10_genome_release/TAIR10_gff3/TAIR10_GFF3_genes.gff
    curl: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory

    002、 问题排查

    (base) root@PC1:/home# which curl                          ## 查看命令目录
    /root/anaconda3/bin/curl
    (base) root@PC1:/home# find ~ -name libssl.so.1.0.0        ## 在家目录查找该文件
    /root/anaconda3/pkgs/openssl-1.0.2p-h14c3975_0/lib/libssl.so.1.0.0

    003、 建立软连接

    (base) root@PC1:/home# ln -s /root/anaconda3/pkgs/openssl-1.0.2p-h14c3975_0/lib/libssl.so.1.0.0 /root/anaconda3/lib/libssl.so.1.0.0
    (base) root@PC1:/home# find ~ -name libssl.so.1.0.0
    /root/anaconda3/lib/libssl.so.1.0.0                                   ## 软连接建立成功
    /root/anaconda3/pkgs/openssl-1.0.2p-h14c3975_0/lib/libssl.so.1.0.0

    004、

    ldd命令是用来查看命令运行所需的共享库,常用来解决命令因缺少某个库文件而不能运行的一些问题。

    (base) root@PC1:/home# ldd ~/anaconda3/bin/curl
            linux-vdso.so.1 (0x00007ffe95bdc000)
            libcurl.so.4 => /root/anaconda3/bin/../lib/libcurl.so.4 (0x00007f663c568000)
            libz.so.1 => /root/anaconda3/bin/../lib/libz.so.1 (0x00007f663c547000)
            librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f663c527000)
            libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f663c504000)
            libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f663c312000)
            libssl.so.1.0.0 => /root/anaconda3/bin/../lib/./libssl.so.1.0.0 (0x00007f663c09c000)     ## 该处的依赖解决
            /lib64/ld-linux-x86-64.so.2 (0x00007f663ca17000)
            libcrypto.so.1.0.0 => not found
            libcrypto.so.1.0.0 => not found

    005、测试

    (base) root@PC1:/home# curl                                     ## 原来的问题解决, 出现类似的报错
    curl: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
    (base) root@PC1:/home# ldd ~/anaconda3/bin/curl
            linux-vdso.so.1 (0x00007ffc74f62000)
            libcurl.so.4 => /root/anaconda3/bin/../lib/libcurl.so.4 (0x00007fbb22942000)
            libz.so.1 => /root/anaconda3/bin/../lib/libz.so.1 (0x00007fbb22921000)
            librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbb22901000)
            libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbb228de000)
            libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbb226ec000)
            libssl.so.1.0.0 => /root/anaconda3/bin/../lib/./libssl.so.1.0.0 (0x00007fbb22476000)
            /lib64/ld-linux-x86-64.so.2 (0x00007fbb22df1000)
            libcrypto.so.1.0.0 => not found
            libcrypto.so.1.0.0 => not found

    006、

    (base) root@PC1:/home# find ~ -name libcrypto.so.1.0.0                        ## 查看该文件
    /root/anaconda3/pkgs/openssl-1.0.2p-h14c3975_0/lib/libcrypto.so.1.0.0
    (base) root@PC1:/home# ln -s /root/anaconda3/pkgs/openssl-1.0.2p-h14c3975_0/lib/libcrypto.so.1.0.0 /root/anaconda3/lib/libcrypto.so.1.0.0 ## 建立软连接
    (base) root@PC1:/home# find ~ -name libcrypto.so.1.0.0                       ## 再次查找
    /root/anaconda3/lib/libcrypto.so.1.0.0
    /root/anaconda3/pkgs/openssl-1.0.2p-h14c3975_0/lib/libcrypto.so.1.0.0
    (base) root@PC1:/home# ldd ~/anaconda3/bin/curl                              ## 查看依赖
            linux-vdso.so.1 (0x00007ffe1ffeb000)
            libcurl.so.4 => /root/anaconda3/bin/../lib/libcurl.so.4 (0x00007f6517a71000)
            libz.so.1 => /root/anaconda3/bin/../lib/libz.so.1 (0x00007f6517a50000)
            librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f6517a30000)
            libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6517a0d000)
            libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f651781b000)
            libssl.so.1.0.0 => /root/anaconda3/bin/../lib/./libssl.so.1.0.0 (0x00007f65175a5000)
            libcrypto.so.1.0.0 => /root/anaconda3/bin/../lib/./libcrypto.so.1.0.0 (0x00007f6517162000)
            /lib64/ld-linux-x86-64.so.2 (0x00007f6517f20000)
            libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f651715c000)

    007、验证

    (base) root@PC1:/home# curl
    curl: try 'curl --help' or 'curl --manual' for more information
    (base) root@PC1:/home# curl --version
    curl 7.61.0 (x86_64-conda_cos6-linux-gnu) libcurl/7.61.0 OpenSSL/1.0.2p zlib/1.2.12
    Release-Date: 2018-07-11
    Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
    Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy
    (base) root@PC1:/home# curl -O ftp://ftp.arabidopsis.org/home/tair/Genes/TAIR10_genome_release/TAIR10_gff3/TAIR10_GFF3_genes.gff   ## 测试下载文件
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 42.0M  100 42.0M    0     0  2188k      0  0:00:19  0:00:19 --:--:-- 6832k

    问题解决。

    参考:

    https://blog.csdn.net/weixin_39471848/article/details/121566810

  • 相关阅读:
    即时搜索(input框)
    HTML的页面IE注释
    浅谈attr()和prop()
    input---checked小问题
    鼠标右键事件
    JavaScript 异步开发全攻略(转)
    remove方法
    javascript 数组以及对象的深拷贝(复制数组或复制对象)的方法
    Hexo的更新 主题的更换
    深浅拷贝,原生和JQuery方法实现
  • 原文地址:https://www.cnblogs.com/liujiaxin2018/p/16583681.html
Copyright © 2020-2023  润新知