Software package wit its own dynamic library - where to install?

by topskip   Last Updated September 05, 2018 19:02 PM

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 LD_LIBRARY_PATH?



Related Questions


How to package shared library in deb packages

Updated November 25, 2016 08:00 AM

What is the role of static libraries?

Updated July 24, 2016 08:00 AM


installation problem in texstudio in Ubuntu 18.04

Updated September 12, 2018 06:02 AM

about the sharing folder in ubuntu

Updated October 06, 2018 10:02 AM