I've been trying to upgrade some programs on an old Linux box (Debian 7.5 wheezy). I'd like to keep default system libs untouched and to add some custom builds alongside them. It works fine for most libs, only OpenSSL gives me a hard time (libssl.so + libcrypt.so).
Here is my OpenSSL configure line:
# ./config --prefix=/usr/local --openssldir=/usr/local/openssl no-gost shared zlib no-ssl2 -fPIC
Then for other programs, for example cURL:
# ./configure LDFLAGS="-L/usr/local/ssl/lib -ldl" --with-ssl --enable-shared
But then I get the wrong OpenSSL version:
# curl --version curl 7.44.0 (x86_64-unknown-linux-gnu) libcurl/7.44.0 OpenSSL/1.0.1e
I know libssl.so has copies in the following folders on this system:
/usr/lib/libssl.so /usr/lib/x86_64-linux-gnu/libssl.so /usr/local/lib/libssl.so /usr/local/ssl/lib/libssl.so
All of them are the same custom-compiled version, except /usr/lib/x86_64-linux-gnu/libssl.so which appears to be my default system lib (v1.0.5e).
I'd like to know how I can instruct configure scripts to avoid looking inside /lib/x86_64-linux-gnu? Can I just change the /usr/lib/x86_64-linux-gnu/libssl.so symlink and point it to my builds? Is it safe?