“error while loading shared libraries” is one of those messages that sends you searching the whole disk. The dynamic linker keeps a list you can ask directly.
The man page describes ldconfig -p as printing the lists of directories and candidate libraries stored in the current cache. That cache is /etc/ld.so.cache by default, built from the directories in /etc/ld.so.conf, and the run-time linker uses it to find libraries:
ldconfig -p | grep libssl
The output has one line per library with its name, the architecture and the path it resolves to. If the library you need appears, the problem is probably a version or architecture mismatch, such as a 32-bit library where a 64-bit one is needed. If it does not appear, it is either not installed or it lives in a folder the linker does not know about.
For a folder the linker does not know, add its path to the list in /etc/ld.so.conf and rebuild the cache as root:
sudo ldconfig
ldconfig -p | grep libexample
The second line confirms the library is registered now. Add -v to the first command if you want to see each directory as it is scanned and the links that get created.
The list shows what the cache knows, not what is on the disk. A library you just copied into a folder will not show up until the cache is rebuilt. Also, running ldconfig without -p as root changes the cache, so type the -p when you only want to look.
Further reading: ldconfig(8) manual page