0

I want to create my own deb package for my application that will be deployed on multiple devices that don't have an internet connection. Therefore I put the application dependency files (downloaded as a deb file) in my application deb package. Before or after installing my application deb package, I should install dependencies.

How can I install dependencies which are stored in my packages?

  • A better approach would be a local repository with all the packages. – Rui F Ribeiro Jun 1 at 13:16
  • Thanks, I will try it. – Hakkı Jun 1 at 13:36
1

Debian-format packages can’t control the installation of other packages except using dependencies in their own control files, which effectively means that dependency resolution has to be performed externally.

In your scenario, the practical consequences of this are that:

  • your package can include other .deb files, but it can’t install them;
  • your package can’t depend on any of those included .deb files.

I recommend shipping all the required packages in a tarball, and instructing users to extract that and install all the resulting packages; see the LibreOffice downloads for an example of this.

| improve this answer | |
  • Thanks for your reply. Can't I use preinst or postinst scripts to do that? – Hakkı Jun 1 at 12:56
  • No, they can’t invoke dpkg to install or remove packages, or any other tool relying on dpkg to do so. – Stephen Kitt Jun 1 at 13:09

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.