libxyz.so: cannot open shared object file: No such file or directoryMade sure that the shared object file in question actually did exist:
ls /lib | grep libxyz.so
ls /usr/lib | grep libxyz.soTurns out that the library was not in any of these standard directories, but existed in a separate directory. Made sure this separate directory was in the LD_LIBRARY_PATH:
echo $LD_LIBRARY_PATHThe directory with the library was part of the load library path, but still no luck launching the executable. The runtime linker responsible for loading up the shared objects uses cached information about the objects rather than sifting through the directory structure. The cache information can be updated by running:
ldconfigRunning ldconfig crashed with a SIGBUS error. A little odd. Used the strace utility to list all the system calls made by ldconfig before the crash:
strace ldconfigThe last "open" system call before the crash was to some random library I had never heard of or even used:
open("/lib/libabc.so", O_RDONLY)Running the "file" command on this mysterious library reveals some deeper problems:
file /lib/libabc.soSolution: copied the same library over from another system and re-ran ldconfig.
In the end, libabc.so was repaired and libxyz.so was perfectly fine. Retried the executable and it started up with no complaints.