I've encountered this problem several times.
Executing some "programs" results in something like
error while loading shared libraries: <name of lib>.so: cannot open shared object file: No such file or directory
My solution/workaround till today is: sudo find / -iname "<name of lib>.so"
then I've receive something like /usr/lib64/<name of lib>.so or even something more specific like /opt/tivoli/tsm/client/api/bin64/<name of lib>.so
then I add those paths (without the name of the lib) to the LD_LIBRARY_PATH environment variable and everything works.
But what is the correct way to handle those kind of error messages?