I am running centos 6.10 in docker. As is described in the title, I set /usr/local/lib and /usr/local/lib64 in a conf file in /etc/ld.so.conf.d/. I need to run ldconfig everytime when I put .so library into /usr/local/lib or it will not be found (when compiling Python 3). However, setting LD_LIBRARY_PATH to /usr/local/lib:/usr/local/lib64 (without writing them to conf files in /etc/ld.so.conf.d/) does not need any additional steps after putting the libs. What causes this?
By the way, why directories like /lib and /usr/lib are not set in /etc/ld.so.conf or /etc/ld.so.conf.d/?