加载共享库时出错:/usr/local/lib64/libssl.so.1.1 [英] Error while loading shared libraries: /usr/local/lib64/libssl.so.1.1

查看:2061
本文介绍了加载共享库时出错:/usr/local/lib64/libssl.so.1.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Centos 7(7.3.1611)上编译openssl-1.1.0e 但是在成功编译所有内容而没有任何警告的情况下,尝试任何openssl命令时出现错误

I’m trying to compile openssl-1.1.0e on Centos 7 (7.3.1611) but after i successfully compiled everything without any warning, i get an error when i’m trying any openssl command

[mdm@dev openssl-1.1.0e]$ openssl version
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

是错误还是我的错误?

以下是有关我的系统/配置的一些信息

Here below some info about my system/configuration

配置:

[mdm@dev openssl-1.1.0e]$ ./Configure linux-x86_64 --prefix=/usr/local --openssldir=/usr/local

进行/进行测试:

...
All tests successful.
Files=91, Tests=486, 44 wallclock secs ( 0.47 usr  0.08 sys + 27.72 cusr 13.41 csys = 41.68 CPU)
Result: PASS
...

进行安装:

...
install libcrypto.a -> /usr/local/lib64/libcrypto.a
install libssl.a -> /usr/local/lib64/libssl.a
install libcrypto.so.1.1 -> /usr/local/lib64/libcrypto.so.1.1
link /usr/local/lib64/libcrypto.so -> /usr/local/lib64/libcrypto.so.1.1
install libssl.so.1.1 -> /usr/local/lib64/libssl.so.1.1
link /usr/local/lib64/libssl.so -> /usr/local/lib64/libssl.so.1.1
...

但是如果我用ldd检查,尽管Make install确实完成了工作,却找不到两个库...

But if i check with ldd two libraries are not found despite Make install did its job...

[mdm@dev openssl-1.1.0e]$ ldd /usr/local/bin/openssl
linux-vdso.so.1 =>  (0x00007fffcfe75000)
/lib/$LIB/liblsp.so => /lib/lib64/liblsp.so (0x00007fa5cd77a000)
libssl.so.1.1 => not found
libcrypto.so.1.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00007fa5cd55d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa5cd341000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa5ccf7f000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa5cd981000)

我已经通过发行版安装了openssl版本:

I have already installed by distro a version of openssl:

[mdm@dev]$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013

[mdm@dev]$ which openssl
/usr/bin/openssl

yum info openssl:

yum info openssl:

...
Installed Packages
Name        : openssl
Arch        : x86_64
Epoch       : 1
Version     : 1.0.1e
Release     : 60.el7_3.1
Size        : 1.5 M
Repo        : installed
From repo   : updates
...

感谢任何帮助或建议!

推荐答案

好吧,有时候,当您想爬山时,您只是在寻找顶部,而无需检查是否可以在基础上有所帮助... 就我而言,我解决了仅在重新编译之前导出LD_LIBRARY_PATH的问题.

Ok, sometime when you want climb the mountain you looking just the top without checking if something can help you on the base... in my case i solved just exporting LD_LIBRARY_PATH before compile it again.

export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64

以及

sudo ldconfig

在重新启动计算机后(以及下次;-)也应保存路径)

that should keep saved the path also after rebooting machine (and also for next times ;-) )

这篇关于加载共享库时出错:/usr/local/lib64/libssl.so.1.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆