My application uses some shared libraries, which i need to package with the binary, and as per
Debian Policy Rules
It is recommended that supporting files and run-time support programs that do not need to be invoked manually by users, but are nevertheless required for the package to function, be placed (if they are binary) in a subdirectory of
/usr/lib
, preferably under/usr/lib/package-name
.
So, I put my shared library e.g. libabc.so
in /usr/lib/myapp/
directory. After creating the debian package the binary fails to load as /usr/lib/myapp/
is not searched by the loader to load the directory. They don't recommend using RPATH
in the binary.
So what changes should i make in the Debian package, in the postinst
file or anything else to make it work.
Best Answer
No, your shared library should be installed:
/usr/lib
directly/usr/lib/<package-name>
with a shortcut in/usr/lib
The manual means:
supporting files
like plugins and modules (in binary form) that your program would scan them by itself. They could be shared libs.so
or any other format, even custom formats.run-time support programs
the executable programs that are used by your program, but are not useful for the user to run them directly, so that note suggests to avoid installing them to/usr/bin
The support files in text format (not generated-binary at least) are more convenient to be installed in
/usr/share/<package-name>
I would recommend to you, making quick look on examples from other packages.