At the moment, I am diving into the .deb packaging system. I'm very new to this, so I have a question to you because I couldn't find an accurate answer on other sites.

Assume I'd like to create a (distributable) .deb package for Software A with pbuilder. The dependencies are libqrencode, libconfig and libABC. For the first to dependencies, there are already packages in the official Ubuntu repositories. So, I only have to add those two libs to the debian/control file (and pbuilder does the rest). But for libABC there's no .deb package in the offical repository and also no PPA etc.

The only thing I have is the source code from GitHub for example.

So, my question is how should I handle this?

  • Do I have to compile libABC from source on my system? But how do I "add" it to pbuilder then?
  • Or do I also have to create another .deb package for libABC first? How could I "add" it to pbuilder? And what if libABC has dependencies without existing .deb packages as well?
  • Or is it a completely different approach?

Thanks in advance for your help!


What you're trying to do will very likely not work, or will take a lot of effort to get working the way you wish it to.

pbuilder, sbuild, etc. all work within pristine core chroots, which contain certain critical packages inside the chroot to build software. The problem is, when you pass a source package into either of these, you will end up having to download the dependencies into the chroot, and there's very few ways around this.

The only way around this is to go into the chroot of the pristine environment, and then manually install packages for the chroot's Ubuntu distribution (yes, you can have chroots for different versions of Ubuntu lying around on your system). This gets to be a very huge headache - because not only do you need the dependencies for your package to build, you need the dependencies of the dependencies, plus additional software packages to install for various libraries, coding languages, extra dependencies determined by the system, etc.

Ultimately, I do not advise creating redistributable packages offline without the dependencies available. Use pbuilder or sbuild or the chroot-based package build environment of your choice, but do it with an Internet connection. Do not try and run chroot-based builds unless you've first modified the chroot on an Internet connection, or use a specifically dedicated system for the building that has selective Internet access to the Ubuntu repositories.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.