I have a C application that was built on RHEL release 5.8 (Tikanga). We have a new box that is running RHEL release 6.3 (Santiago). Whenever I try to run the application on the new machine, I receive the following output:
myApp: error while loading shared libraries: libldap-2.3.so.0: cannot open shared object file: No such file or directory
I am gathering that this is because I compiled my application on a different RHEL release than what I am attempting to run it on, as RHEL release 6.3 (Santiago) has a different version of the LDAP libraries I need in /lib64, namely, libldap-2.4.so.2. Without simply installing the old libldap-2.3.so.0 library (there are administrative reasons why this is not possible), is there a way to abstract library dependence so that I can compile code that is not dependent on a specific version of a library?