You can check location of libraries with ldconfig. For example, if you are looking for libffi
% ldconfig -p | grep ffi
libffi.so.6 (libc6,x86-64) => /lib64/libffi.so.6
“-p” – Print the lists of directories and candidate libraries stored in the current cache.