Post4VPS Forum | Free VPS Provider

Full Version: libssl.so.1.1 error in ubuntu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello all my friends. today i like to install a program in my vps but when i try to run it i got this command error in putty. can anyone help me to fix this error?


Code:
error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Moved to VPS Support Forum.
Your description is too much vague, please describe more about the program and which commands you are running.

That library is used for crypto and https mainly, which program needs to use it?
Most likely the OpenSSL version that you have installed is an older version that lacks the necessary version of the libssl library files. You need atleast OpenSSL 1.1.0 to get the necessary libraries included.

You should always mention your OS when making support requests.

You can check your openssl version:
Code:
openssl version

You can also check which versions of libssl you have:
Code:
ls /usr/lib/x86_64-linux-gnu | grep libssl


Example:
Terminal
[ 14:07 kokakukidotai@lydia6 ~ ]
$ ls /usr/lib/x86_64-linux-gnu | grep libssl
libssl3.so
libssl.a
libssl.so
libssl.so.1.0.2
libssl.so.1.1

[ 14:07 kokakukidotai@lydia6 ~ ]
$ openssl version
OpenSSL 1.1.1d 10 Sep 2019
(05-25-2020, 12:09 PM)Hidden Refuge Wrote: [ -> ]Most likely the OpenSSL version that you have installed is an older version that lacks the necessary version of the libssl library files. You need atleast OpenSSL 1.1.0 to get the necessary libraries included.

You should always mention your OS when making support requests.

You can check your openssl version:
Code:
openssl version

You can also check which versions of libssl you have:
Code:
ls /usr/lib/x86_64-linux-gnu | grep libssl


Example:
Terminal
[ 14:07 kokakukidotai@lydia6 ~ ]
$ ls /usr/lib/x86_64-linux-gnu | grep libssl
libssl3.so
libssl.a
libssl.so
libssl.so.1.0.2
libssl.so.1.1

[ 14:07 kokakukidotai@lydia6 ~ ]
$ openssl version
OpenSSL 1.1.1d  10 Sep 2019


i got this after putting given commands


Code:
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 2.6.32-042stab142.1 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

Last login: Wed Jun  3 05:22:48 2020 from 39.50.27.14
root@test:~# openssl version
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
root@test:~# ls /usr/lib/x86_64-linux-gnu | grep libssl
libssl.a
libssl.so
root@test:~#
That looks like your OpenSSL installation is broken. Try reinstalling OpenSSL as a whole and see what it will bring. I see you are using Ubuntu 16.04 which only has OpenSSL 1.0.2. So more likely you need a more up to date Ubuntu version or a way to install a newer OpenSSL version on Ubuntu 16.04.

Like: https://websiteforstudents.com/manually-...18-04-lts/ (I have not tested this - just a few minutes of Google searching.)
(05-25-2020, 11:32 AM)sagher Wrote: [ -> ]
Code:
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:
Code:
ldd /usr/bin/openssl

On a healthy CentOS system, with
Code:
[root@centos ~]# openssl version
OpenSSL 1.1.1c FIPS  28 May 2019

.. the output should be something like the following:
Code:
[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 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.
Code:
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:
Code:
root@ubuntu:~# openssl version
OpenSSL 1.0.2g  1 Mar 2016

The linked shared libraries are:
Code:
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:
Code:
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!
@[b]fChk[/b]   when i put given commands i got this ..

 

Code:
root@test:~# ldd /usr/bin/openssl
ldd: /usr/bin/openssl: No such file or directory
root@test:~# openssl version
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
root@test:~#
(06-06-2020, 05:06 AM)sagher Wrote: [ -> ]@[b]fChk[/b]   when i put given commands i got this ..

 

Code:
root@test:~# ldd /usr/bin/openssl
ldd: /usr/bin/openssl: No such file or directory
root@test:~# openssl version
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
root@test:~#

Then try :
Code:
which openssl

Then
Code:
ldd <whatever_path_you_had_above>

The above is just for my curiosity!... Your issue is clear: you messed up your system OpenSSlL which is 1.0.2; so, shouldn't require libssl.so.1.1 in the first place. Re-read my previous post for the solution.

From your previous post, we know that you have: libssl.so in the /usr/lib/x86_64-linux-gnu path. So, you can try the following, which could solve openSSL problem but your system will complain as it's not 1.0.2 version.
Code:
ln -s  /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/libssl.so.1.1

Again the above may solve OpenSSL error but it's not the system's 1.0.2 version!
This - https://github.com/openssl/openssl/issue...-337632051 - should fix your issue.

And the reason for the issue can be inferred from the first and second comments. Smile

Regards,
Pages: 1 2