我正在尝试在Centos 7 (7.3.1611)上编译openssl-1.1.0e,但是尽管一切都成功编译而没有任何警告,但在尝试任何openssl命令时我会遇到错误。
[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
这是一个bug还是我的错误?
以下是我的系统/配置信息:
配置:
[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做了它的工作,但有两个库没有被找到...
[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版本的发行版:
[mdm@dev]$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
[mdm@dev]$ which openssl
/usr/bin/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
...
感激任何帮助或建议!
libssl.so.1.1 => /usr/local/lib64/libssl.so.1.1 (0x00007f48a2c45000) libcrypto.so.1.1 => /usr/local/lib64/libcrypto.so.1.1 (0x00007f48a27a1000)
@jww - fromthestone