How do I make my PHP Source installation use the libraries inside of
/usr/local/programname/lib instead or
I have tried setting LD_LIBRARY_PATH to each of the program names like
And, I logged out. Even ran
source /etc/environment (I have put the LD_LIBRARY_PATH variable in /etc/environment), even rebooted the system.
But still, when I run
./configure --with-openssl --with-curl, it tells me that libssl does not exist.
I do not want to use the
libcurl-dev package provided by apt, because I need the newest versions, for testing.
And, I noted that: If I install the program's lib directory in
/usr/local/lib instead of
/usr/local/programname/lib, it works without setting any environment variables.
But, in my opinion,
/usr/local/programname/lib is more clear, so I want to use this type of path.
How can I make it so that PHP uses the libraries inside
/usr/local/programname/lib instead of
/usr/local/lib? By that I mean that, I want to give more priority to
/usr/local/programname/lib than other
programname refers to the name of each of the programs that is installed inside of
I even tried to use
/etc/ld.so.conf.d/programname.conf (I wrote
/usr/local/programname inside it), and ran
ldconfig. But still no luck.
Btw, I am using Ubuntu 20.10
"Don't fight the system's conventions" - I can't just move on like that. I have to try to do this, or I will just be stuck, and be dependent on the kinda old packages that apt gives me (even if it gives me the newest ones, I cannot for example: use http/3 and test it and more..). And, no testing will be possible. I do this to make my programs future proof, and even to have fun experimenting these. By testing with programs that are new. Installing in
/usr/local doesn't feel good, because I test with multiple versions of the libraries. Like I test with OpenSSL 1.1.1i and OpenSSL 3.0.0, and other versions too. So, installing to /usr/local will not benefit me on this, but installing to
/usr/local/openssl-3.0.0 will be more clean, and will save me more time. I can't just keep running
make install and
make uninstall every time. Not only OpenSSL, even cURL, and other packages.