I'm curious as to how other Linux admins manage /etc/ld.so.conf and in general, shared libraries across multiple Linux servers.

We have about 30-40 Linux servers running SLES 11. Since they are tied to Active Directory, users can log into any server with their same credentials. Originally, each server had its own local ld.so.conf. However, we ran into issues where a specific piece of software, php for example, would run on server X but crash on server Y because a sys admin rearranged ld.so.conf on server Y. We strive for consistency across servers so users can easily use any number of servers for load balancing. There are certain servers that have specific purposes of course though.

We thought symlinking to a shared ld.so.conf with a script that goes out and runs ldconfig on all servers whenever a change is made. I thought it would bring consistency across all servers, but I see how some servers would need a custom ld.so.conf because it runs different software that may need a different lib version.

I've only been a Linux admin for under three years, so this may be a simple answer for some, so just looking for advice on this topic. Questions that came to mind:

  • local or symlinked /etc/ld.so.conf?
  • clean out old versions of shared libs if multiple versions exist in different lib directories?

1 Answer 1


Normally user or rather app related configurations should be in the:


and included from /etc/ld.so.conf. Which can be identical across all servers and should not be touched

This way your management becomes easier by simply making the directory /etc/ld.so.conf.d/ consistent across all of your servers.

You can probably come up with a simple rsync script that will do this for you.

  • Good info, thanks. One issue I ran into is a server that is running ntop. Ntop needs newer versions of a specific shared lib, and these newer versions are in /usr/local/lib. The older versions are in /usr/lib, and ntop crashes when using the old versions. Is there a way to have ntop look at /usr/local/lib FIRST before /usr/lib? Right now, I have a local ld.so.conf that I rearranged to make ntop happy. But per your answer, I don't want to change ld.so.conf. How would ntop know to load a specific config in ld.so.conf.d? Maybe I'm not understanding how its used by apps.
    – Banjer
    Mar 7, 2012 at 14:56
  • 1
    @Banjer Use LD_LIBRARY_PATH environment variable in the start script instead. Or install ntop that comes with the distribution it should be properly integrated with libraries distributed.
    – Karlson
    Mar 7, 2012 at 15:44
  • Creating a "wrapper" script that sets LD_LIBRARY_PATH and then calls the program is a good idea. This should take care of any wacky programs out there that don't like our ld.so.conf.
    – Banjer
    Mar 7, 2012 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.