FreeBSD's ldconfig binary doesn't work the same as the one in Linux derivatives. If you happen to type ldconfig -v, for instance, you're going to lose all your configuration information. To fix the problem:
# ldconfig -m /usr/local/lib/compat/pkg # ldconfig -m /usr/libexec # ldconfig -m /usr/X11R6/lib # ldconfig -m /usr/local/lib # ldconfig -m /usr/lib
bsdcommandsfreebsdldconfiglibraries
Given an executable /path/to/EXEC:
$ ldd /path/to/EXEC
commandsdependenciesdiagnosticexecutablelddlibrariesutilities