(05-25-2020, 11:32 AM)sagher Wrote: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Any time you see the 'Error while loding shared libraries: XYZ' message, you should know that something is messed up with (yes!) the shared libraries!..
One way to try to debug the problem is to run this command:
On a healthy CentOS system, with
[root@centos ~]# openssl version
OpenSSL 1.1.1c FIPS 28 May 2019
.. the output should be something like the following:
[root@centos ~]# ldd /usr/bin/openssl
linux-vdso.so.1 (0x00007ffd1d1db000)
libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007f2b52224000)
libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007f2b51d45000)
libz.so.1 => /lib64/libz.so.1 (0x00007f2b51b2e000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f2b5192a000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2b5170a000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2b51347000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2b52773000)
On a problematic one, like yours, libssl.so.1.1 should be missing (hence the error.)
The problem is either a simple symlinking issue or a botched install that messed up the initial setup etc.....
In short, before trying a reinstall, as @'Hidden Refuge' suggested, try the ldd command and tell us what you've got!
UPDATE: 05/06/00
Ok!.. I'm back on this as I didn't have much time to really assess the issue here yesterday.
I've just started an LXC container of Ubuntu 16.04.6 LTS (Xenial Xerus), locally.
root@ubuntu:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
The idea is to simulate your situation locally. So, when looking for which OpenSSL version is actually present in the system out-of-the-box, you got this:
root@ubuntu:~# openssl version
OpenSSL 1.0.2g 1 Mar 2016
The linked shared libraries are:
root@ubuntu:~# ldd /usr/bin/openssl
linux-vdso.so.1 => (0x00007ffd301e8000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f457bf30000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f457baeb000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f457b721000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f457b51d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f457c199000)
When locating the libssl linkage(/symlininkg), we have this:
root@ubuntu:~# ls -al /lib/x86_64-linux-gnu | grep libssl
-rw-r--r--. 1 root root 428384 May 27 20:19 libssl.so.1.0.0
Thus, you clearly messed up your system's default OpenSSL 1.0.2, which is never a good thing, as there are many system files that depend on it.
Generally, when we need another OpenSSL version on the system, we compile it in the /usr/local path and link whatever program that needs it with it.
In short, reinstall the system's Openssl (ie the 1.0.2 version) and compile the custom one in the standard /usr/local path for other programs to use.
Another more straightforward solution: Just use a more recent Ubuntu version.
Good luck!