android studio 2.2缺少libssl.so.1.0.0的解决办法

    OS 环境:CentOS7.2

    利用android studio 2.2 新建了一个C++的环境,打开后cpp下的目录文空,也新建不了C/C++文件,通过gradle同步工程的时候cmake一直报找不到libssl.so.1.0.0。对openssl 1.0.0有依赖。CentOS 7.2 默认的是 openssl 1.0.1。
    先看下android studio自带的cmake的依赖库。
[root@localhost bin]# ldd cmake
    linux-vdso.so.1 =>  (0x00007ffd32f6d000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f1f30329000)
    libssl.so.1.0.0 => not found
    libcrypto.so.1.0.0 => not found
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f1f30020000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f1f2fd1e000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f1f2fb07000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f1f2f745000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f1f30544000)
    查看CentOS支持的openssl
[root@localhost Downloads]# yum --showduplicates list openssl
Loaded plugins: axelget, fastestmirror, langpacks, nvidia
No metadata available for base
No metadata available for elrepo
No metadata available for epel
No metadata available for extras
No metadata available for updates
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.btte.net
 * updates: mirrors.aliyun.com
Installed Packages
openssl.x86_64                                          1:1.0.1e-51.el7_2.5                                           @updates
Available Packages
openssl.x86_64                                          1:1.0.1e-42.el7.9                                             base    
openssl.x86_64                                          1:1.0.1e-51.el7_2.1                                           updates 
openssl.x86_64                                          1:1.0.1e-51.el7_2.2                                           updates 
openssl.x86_64                                          1:1.0.1e-51.el7_2.4                                           updates 
openssl.x86_64                                          1:1.0.1e-51.el7_2.5                                           updates 

寻找包含libssl.so.1.0.0的安装包:

[root@localhost cmake]# yum provides */libssl.so.1.0.0
Loaded plugins: axelget, fastestmirror, langpacks, nvidia
No metadata available for base
No metadata available for elrepo
No metadata available for epel
No metadata available for extras
No metadata available for updates
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.btte.net
 * updates: mirrors.aliyun.com
No matches found
    /usr/lib64下面有libssl.so.1.0.1e,看看那个包包含这个文件。
[root@soft lib64]# yum provides */libssl.so.1.0.1e
Loaded plugins: axelget, fastestmirror, langpacks, nvidia
No metadata available for adobe-linux-x86_64
No metadata available for base
No metadata available for docker-experimental-repo
No metadata available for docker-main-repo
No metadata available for elrepo
No metadata available for epel
No metadata available for extras
No metadata available for google-chrome
No metadata available for updates
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.163.com
 * updates: mirrors.aliyun.com
1:openssl-libs-1.0.1e-42.el7.9.i686 : A general purpose cryptography library with TLS implementation
Repo        : base
Matched from:
Filename    : /usr/lib/libssl.so.1.0.1e



1:openssl-libs-1.0.1e-42.el7.9.x86_64 : A general purpose cryptography library with TLS implementation
Repo        : base
Matched from:
Filename    : /usr/lib64/libssl.so.1.0.1e



1:openssl-libs-1.0.1e-51.el7_2.1.i686 : A general purpose cryptography library with TLS implementation
Repo        : updates
Matched from:
Filename    : /usr/lib/libssl.so.1.0.1e



1:openssl-libs-1.0.1e-51.el7_2.1.x86_64 : A general purpose cryptography library with TLS implementation
Repo        : updates
Matched from:
Filename    : /usr/lib64/libssl.so.1.0.1e



1:openssl-libs-1.0.1e-51.el7_2.2.i686 : A general purpose cryptography library with TLS implementation
Repo        : updates
Matched from:
Filename    : /usr/lib/libssl.so.1.0.1e



1:openssl-libs-1.0.1e-51.el7_2.2.x86_64 : A general purpose cryptography library with TLS implementation
Repo        : updates
Matched from:
Filename    : /usr/lib64/libssl.so.1.0.1e



1:openssl-libs-1.0.1e-51.el7_2.4.i686 : A general purpose cryptography library with TLS implementation
Repo        : updates
Matched from:
Filename    : /usr/lib/libssl.so.1.0.1e



1:openssl-libs-1.0.1e-51.el7_2.4.x86_64 : A general purpose cryptography library with TLS implementation
Repo        : updates
Matched from:
Filename    : /usr/lib64/libssl.so.1.0.1e



1:openssl-libs-1.0.1e-51.el7_2.5.i686 : A general purpose cryptography library with TLS implementation
Repo        : updates
Matched from:
Filename    : /usr/lib/libssl.so.1.0.1e



1:openssl-libs-1.0.1e-51.el7_2.5.x86_64 : A general purpose cryptography library with TLS implementation
Repo        : updates
Matched from:
Filename    : /usr/lib64/libssl.so.1.0.1e



1:openssl-libs-1.0.1e-51.el7_2.5.x86_64 : A general purpose cryptography library with TLS implementation
Repo        : @updates
Matched from:
Filename    : /usr/lib64/libssl.so.1.0.1e
    在http://rpm.pbone.net/上搜索 openssl1-1.0.0 ,搜到openssl1-1.0.0-4.fc24.x86_64.rpm ,下载安装。
[root@localhost Downloads]# yum install openssl1-1.0.0-4.fc24.x86_64.rpm 
Loaded plugins: axelget, fastestmirror, langpacks, nvidia
Examining openssl1-1.0.0-4.fc24.x86_64.rpm: openssl1-1.0.0-4.fc24.x86_64
Marking openssl1-1.0.0-4.fc24.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package openssl1.x86_64 0:1.0.0-4.fc24 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package     Arch      Version           Repository                        Size
================================================================================
Installing:
 openssl1    x86_64    1.0.0-4.fc24      /openssl1-1.0.0-4.fc24.x86_64    2.1 M

Transaction Summary
================================================================================
Install  1 Package

Total size: 2.1 M
Installed size: 2.1 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : openssl1-1.0.0-4.fc24.x86_64                                 1/1 
  Verifying  : openssl1-1.0.0-4.fc24.x86_64                                 1/1 

Installed:
  openssl1.x86_64 0:1.0.0-4.fc24                                                

Complete!

[root@localhost Downloads]#  yum provides */libssl.so.1.0.0
Loaded plugins: axelget, fastestmirror, langpacks, nvidia
No metadata available for base
No metadata available for elrepo
No metadata available for epel
No metadata available for extras
No metadata available for updates
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * epel: mirrors.neusoft.edu.cn
 * extras: mirrors.btte.net
 * updates: mirrors.aliyun.com
openssl1-1.0.0-4.fc24.x86_64 : Secure Sockets Layer communications libs & utils
Repo        : @/openssl1-1.0.0-4.fc24.x86_64
Matched from:
Filename    : /usr/lib64/libssl.so.1.0.0


[root@localhost bin]# ldd cmake
./cmake: /lib64/libcrypto.so.1.0.0: no version information available (required by ./cmake)
./cmake: /lib64/libssl.so.1.0.0: no version information available (required by ./cmake)
./cmake: /lib64/libssl.so.1.0.0: no version information available (required by ./cmake)
    linux-vdso.so.1 =>  (0x00007ffe1a1c0000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007fb1f92b1000)
    libssl.so.1.0.0 => /lib64/libssl.so.1.0.0 (0x00007fb1f9054000)
    libcrypto.so.1.0.0 => /lib64/libcrypto.so.1.0.0 (0x00007fb1f8c92000)
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fb1f898a000)
    libm.so.6 => /lib64/libm.so.6 (0x00007fb1f8688000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fb1f8471000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fb1f80af000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fb1f94cc000)
    libz.so.1 => /lib64/libz.so.1 (0x00007fb1f7e99000)
[root@localhost bin]# 
    安装完毕后查看/usr/lib64下有了libssl.so.1.0.0,android studio ndk相关功能正常,希望google在打包cmake的时候提升下openssl的版本。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 8
    评论
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值