I'm refining our installer. The way it works is all our components are made into .deb files. The installer merely calls dpkg on all of them at once, along with their dependencies. This works great...as long as you install onto Ubuntu Linux 8.04.1. When installing in Ubuntu 8.04.3, for instance, the version of libc6-dev that might be installed is greater. But dpkg still seems to install our version of libc6-dev, despite the fact that a higher version is already installed. As you might expect, this causes problems.

What is the proper way to do this? Check every package we're about to install against the one on the system? I thought dpkg or apt did this for us. Secondly, why must this be as painful as it is? The target computers will not have Internet access, nor access to a mirror. We must be able to ship the application to be fully self-contained. Packages were supposed to free us from dependency hell and it seems like they are not.

2 Answers 2


The cleanest solution would seem to be to put all your packages in a local repository, like a package CD, and add a file in /etc/apt/sources.list.d to include the repository. Then it should be a simple matter of doing aptitude update; aptitude install <packages> to automatically get exactly the correct packages installed.

  • The file is located at /etc/apt/sources.list
    – Telemachus
    Oct 1, 2009 at 19:49
  • 2
    I do this for our product. I simply add a file to /etc/apt/sources.list.d. That way I don't have to modify the system installed file. It works great. Oct 1, 2009 at 21:01
  • @Michael Kohne: You're absolutely right, that's a much better way. I've changed my answer accordingly.
    – Teddy
    Oct 1, 2009 at 21:14

I don't believe that dpkg checks the version number of already-installed packages. apt should do this, but I don't believe it will install from disk unless you modify sources.list (typically located in /etc/apt/). If you add your source directory into the sources.list, you should just be able to run the standard apt-get install command, and all the checking it does for you.

  • /etc/apt, please, rather than \etc\apt
    – Telemachus
    Oct 1, 2009 at 19:48
  • Indeed, you are correct. This is what I get for using Windows all day. Fixed. Oct 1, 2009 at 20:26

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.