首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >如何使openssl在Debian9.5上工作

如何使openssl在Debian9.5上工作
EN

Unix & Linux用户
提问于 2018-12-08 03:59:17
回答 1查看 1K关注 0票数 1

这是我使用的发行版

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
  root@ci-server:~/temp# lsb_release -a
    No LSB modules are available.
    Distributor ID: Debian
    Description:    Debian GNU/Linux 9.5 (stretch)
    Release:        9.5
    Codename:       stretch

在安装openssl时,我收到以下消息,但使用openssl根本不起作用

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
root@ci-server:~/temp# apt-get install openssl
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssl is already the newest version (1.1.0j-1~deb9u1).
0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.
root@ci-server:~/temp# openssl version
openssl: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

libcrypto.so.1.1是在这里发现的

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
root@ci-server:~/temp# find / -name "libcrypto.so.1.1"
/usr/lib64/libcrypto.so.1.1

ldconfig含量

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
root@ci-server:~# cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
root@ci-server:~# ls -l /etc/ld.so.conf.d/
total 12
-rw-r--r-- 1 root root 38 Jan 17  2017 fakeroot-x86_64-linux-gnu.conf
-rw-r--r-- 1 root root 44 Mar 20  2016 libc.conf
-rw-r--r-- 1 root root 68 Jan 14  2018 x86_64-linux-gnu.conf

/usr/lib64中查找/etc/ld.so.conf.d没有产生任何结果

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
root@ci-server:~# grep -irl "/usr/lib64" /etc/ld.so.conf.d/
root@ci-server:~#
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2018-12-08 05:25:06

Debian9.5中libcrypto.so.1.1的预期位置是/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1,而不是/usr/lib64.包含它的包是libssl1.1,它包含OpenSSL的库;在Debian中,openssl包只包含配置文件、/usr/bin/openssl/usr/bin/c_rehash命令二进制文件以及相关的手册页。openssl包(以及任何需要OpenSSL库的东西)都依赖于libssl1.1。这样,如果您不需要openssl命令行工具,并且正在构建一个存储空间最小的嵌入式系统,那么包管理允许您只安装库。

在x86_64架构上重新安装Debian9.x时,/usr/lib64甚至不应该存在。它存在的事实表明,openssl的另一个副本可能是从另一个源安装的(可能是通过从另一个主机复制二进制文件,或者通过安装用于其他发行版的数据包)。

请运行dpkg --verify libssl1.1 openssl以验证系统上的libssl1.1openssl包的完整性。输出将列出已修改的任何文件:例如,如果输出中列出了/usr/bin/openssl二进制文件,您就会知道您的系统的openssl已被篡改。

最糟糕的情况是,您的系统已被黑客入侵,入侵者试图用修改后的版本替换您的OpenSSL,该版本将泄露您的私钥给入侵者。如果是这样的话,那么入侵者就犯了一个错误,可能是因为在Debian系统上使用了一组库,这些库用于RHEL/CentOS/Fedora风格的系统(通常使用/usr/lib64路径)。

如果你认为你的系统可能被黑了,不要惊慌。服务器故障有一个如果你怀疑你的服务器已经被黑客入侵了,你应该如何做呢?

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/486757

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文