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
Is it a bug or my mistake?
Here below some info about my system/configuration
Configure:
[mdm@dev openssl-1.1.0e]$ ./Configure linux-x86_64 --prefix=/usr/local --openssldir=/usr/local
Make/Make test:
...
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
...
Make install:
...
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
...
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)
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:
...
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
...
Appreciate any help or suggestion!
I know this is late but in my case I did not have the libssl.so.1.1
on my server.
There was a recommendation here to install openssl11-libs
but not openssl11
as installing it could create problems.
Confirm you dont have libssl.so.1.1
on your server probably by trying locate libssl.so.1.1
.
Simply do sudo yum install -y openssl11-libs
if you don't have the libssl.so.1.1
library on your server.
It worked for me.
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
and after
sudo ldconfig
that should keep saved the path also after rebooting machine (and also for next times)
thanks to levitte, RenatoXSR
for OpenSSL 1.1.0g
, CentOS 7.2.1511
, you can try this
sudo bash -c "echo '/usr/local/lib64' >> /etc/ld.so.conf"
sudo ldconfig
this link explains the cause of problem
The use of RPATH is inconsistent. On some systems, ld.so considers RPATH before even looking at LD_LIBRARY_PATH, which makes it hard to override, for example when testing a new OpenSSL build (!). We did so in pre-1.1.0 versions by hacking LD_PRELOAD, but there are some sanitizers that do not agree with that, which makes life hard as well, for example when testing a new OpenSSL build (!)
this link gave an solution example
Try this:
ldd libssl.so -> libcrypto.so.1.1 => not found
sudo ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007f17d46c7000)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With