I have written a piece of software (a
.deb package) which ships with a dynamic library (
foo.so) which is only usable to my softare.
Where should I place the library and how can I load it?
I don't think that
/usr/lib is a good place, because no other softare will ever use the library. Should it reside in for example
/usr/lib/mypackage/foo.so (that would be my preferred place)? If yes, how would the dynamic linker find the library? Since it is only usable for my software, an entry in
/etc/ld.so.conf.d/ (which is visible to all other software) is not the first choice. (I use Lua ffi to load the library so I think I can tweak the load path.) Or should I use