Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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. 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.

share|improve this question
What's the nature of the binary that fails to load your shared library? Where is it installed? Is it using the system's dynamic linker, or dlopen? – Robie Basak Jan 23 '13 at 15:47
@RobieBasak It is a Qt application, which uses library. The binary is installed in /usr/bin/ . And i don't know what dlopen or dynamic linker is. – adnan kamili Jan 23 '13 at 15:59
If i copy the shared library to /usr/lib it works fine, but it is against the debian policy rules, and lintian displays lot many errors in that case – adnan kamili Jan 23 '13 at 16:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.