openssl: libssl.so.1.1: cannot open shared object file
This looks related: Openssl 1.1.1-dev Not linking its own libraries correctly.
Why not just use an RPATH so things “just work”? Shouldn’t “just work” be the default out-of-the-box? Let those who want something special do something special.
$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 25 (Twenty Five)
Release: 25
Codename: TwentyFive
Build and install OpenSSL 1.1.0:
make distclean
./config enable-ec_nistp_64_gcc_128
make -j 9
sudo make install_sw
Then:
$ bash -r
$ openssl s_client -connect pypi.python.org:443 | openssl x509 -text -noout
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Hmm…
$ which openssl
/usr/local/bin/openssl
And:
$ ldd /usr/local/bin/openssl
linux-vdso.so.1 (0x00007ffe99b3e000)
libssl.so.1.1 => not found
libcrypto.so.1.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00007ff27aec4000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff27aca4000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff27a8dc000)
/lib64/ld-linux-x86-64.so.2 (0x000055642bb36000)
And:
$ ls /usr/local/lib64
engines-1.1 libcrypto.so libssl.a libssl.so.1.1
libcrypto.a libcrypto.so.1.1 libssl.so pkgconfig
And:
$ ldconfig -v 2>/dev/null | grep -v ^$'\t'
/usr/lib64/bind99:
/lib:
/lib64:
/lib/sse2: (hwcap: 0x0000000004000000)
/lib64/tls: (hwcap: 0x8000000000000000)
/lib64/sse2: (hwcap: 0x0000000004000000)
Linux paths are so f**k’d up. Its sad things are still in this state in 2017.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (5 by maintainers)
I had the same issue after installing master branch at /usr/local/openssl.
Reading through this page I managed to identify the problem and had to add the path /usr/local/openssl/lib to /etc/ld.so.conf and run ldconfig
Some advice
Hope this helps.
thanks to RenatoXSR
for CentOS Linux release 7.2.1511, OpenSSL 1.1.0g
please add the path
/usr/local/lib64to/etc/ld.so.confand run ldconfigWhat actually worked for me on CentOS 7 was:
sudo yum install openssl11-libs.It is still broke even with RPATHs. This is not rocket science…
And then:
I mean, seriously… How can the project have this many problems with a simple concept?
If the project cannot keep its run paths straight and its keeps losing its shared objects, then it may as well static link. With static linking there is hope that things will “just work”.
Yeah, similar for me on Arch, this worked:
sudo pacman -S openssl-1.1Thanks @RenatoXSR. On Ubuntu 16 (Xenial) the missing shared object file (
libssl.so.1.1) was found at/usr/local/lib, and adding it to/etc/ld.so.confand runningsudo ldconfigfixed the issue; I re-ranopenssland the problem was corrected.Thank you @RenatoXSR That fixed it for me. (Ubuntu 16.04.3 LTS - OpenSSL_1_1_0-stable)
Thanks a bunch @RenatoXSR This works on Raspbian GNU/Linux 8 (jessie)
@RenatoXSR works on CentOS7 4.16.1-1.el7