'openssl 3 doesn't install libs (crypto & ssl) 32bits compatible
I installed OpenSSL 3(.0.2) from source on my debian 11, and it installed libcrypto.so.3 and libssl.so.3 in /usr/local/lib64.
The folder is not very important but it indicate to me that this libs are only 64bit, and theorically it's not a problem.
Then I installed Curl 7(.82.0) from source, and it installed libcurl.so.4.7.0 in /usr/local/lib. I don't know if it's only 32bits or 64bits compatible, and I don't think (but not sure) it's revelant.
The problem is that curl is not able to use lib installed by openssl. I can see it when I launch curl : error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory or directly when looking on libcurl :
ldd /usr/local/lib/libcurl.so.4
linux-vdso.so.1 (0x00007fff6e857000)
libssl.so.3 => not found
libcrypto.so.3 => not found
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fbf9d271000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbf9d24f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbf9d08a000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbf9d328000)
The libs really exist (in the lib64 folder) with enough rights (rwxr-xr-x), and with some research I understand that it's certainly an architecture problem (32/64).
I try to reinstall curl (so much time) with different flags to force library_path to /usr/local/lib64, but without any effect.
I also wanted to try to reinstall OpenSSL in 32 bits, but never find a way to do this (and I'm convinced that it's not a good solution).
Notice that my develop environement is an Ubuntu 20.04.4 LTS, where everything works fine. But because it's my sandbox too, I had installed lot of other things and don't remember in which order. So I'm not able to find the point. I can said that on this env, libs are locate in /usr/local/lib64 too (and no where else).
Last point : My debian (with problem) is a "production" environement, so I can't totally uninstall and reinstall everything easily .
Where do I have to start investigation ? I would like to "force" curl to use the 64lib but it doesn't work like that :)
Solution 1:[1]
If someone have the same problem one day, I finally found a workaround.
My problem came from multiple installation of OpenSSL. One from the OS (1.X) and one from my manual installation (3.X). With this 2 versions lib can't correctly linked.
After some investigations (on curl github) I found that it's not possible to correctly force curl to use the version of openSSL that I wan't (3.X)
So I remove the old openSSL and everything work (note that if I reinstall it the problem come back).
It's not a very good solution but it work, until I don't need an old version of openSSL (and I hope I never need it ^^)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | zzDiego |
