I have different openssl
versions on my system and I don't want to install the most current openssl
version into the system location - e.q. /usr/bin/openssl
.
Now, when I compile openssl
then I get this running ldd
:
root => ldd /FaF/openssl/bin/openssl
linux-vdso.so.1 (0x00007ffe60d92000)
--> libssl.so.1.1 => not found
--> libcrypto.so.1.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00007facf337b000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007facf315e000)
libc.so.6 => /lib64/libc.so.6 (0x00007facf2dbd000)
/lib64/ld-linux-x86-64.so.2 (0x00007facf357f000)
I refer to libssl.so.1.1
and libcrypto.so.1.1
which are not found and this is OK that far.
Running ldd
with preceded LD_LIBRARY_PATH
works:
root => LD_LIBRARY_PATH=/FaF/openssl/lib/ ldd /FaF/openssl/bin/openssl
linux-vdso.so.1 (0x00007fff221a1000)
libssl.so.1.1 => /FaF/openssl/lib/libssl.so.1.1 (0x00007f45f842a000)
libcrypto.so.1.1 => /FaF/openssl/lib/libcrypto.so.1.1 (0x00007f45f7f9a000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f45f7d96000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f45f7b79000)
libc.so.6 => /lib64/libc.so.6 (0x00007f45f77d8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f45f869b000)
/FaF/openssl/lib
is the directory where the correct libraries are.
I have now these possible solutions:
- Adding
/FaF/openssl/lib
to/etc/ld.so.conf
and runningldconfig
- This is not really an option because it may break the system version ofopenssl
. - As I did in the above example I can precede each time I need
openssl
withLD_LIBRARY_PATH=/FaF/openssl/lib/
- not really a good option and it isn't always possible. - I can link the path with
--rpath=/FaF/openssl/lib
intoopenssl
.
My question:
For the moment I didn't figure out how to set --rpath=/FaF/openssl/lib
in the configure
command which generates openssl
. Can somebody provide me this information?
I tried setting LD_LIBRARY_PATH
and LDFLAGS
but nothing works.
I prefer a solution which is hard-coded into openssl
so there are not other settings required.