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

Using a third-party install generation tool, I created a .deb package for my application.

There are several dependencies that are required to be present on user’s Linux OS for my application to run properly. Specifically, “make”, and several “.so” libraries, like, etc.

Not all of our Ubuntu users may have required dependencies installed prior to running my package installer.

This third-party installer tool that I used, generates DEB package, but does not include dependency checks.

As members of the Ubuntu community, could you please comment on how a custom .DEB package without dependency checks may be received by Linux-Ubuntu users?

Is it acceptable enough to deliver .deb for a custom application that does not check dependencies? Or is it uncommon enough to ‘anger’ Linux users?

share|improve this question

Disclaimer: This is almost identical to my other answer.

Since your program won't generate dependency information, we'll add it in ourselves. For example, you will need to edit the line that starts with Depends: in the format:

 Depends: package1, package2|package3

if you need package one, and one of package 2 OR package 3.

Open gedit or nano and paste:


if [[ -z "$1" ]]; then
  echo "Syntax: $0 debfile"
  exit 1

TMPDIR=`mktemp -d /tmp/deb.XXXXXXXXXX` || exit 1
OUTPUT=`basename "$DEBFILE" .deb`.modfied.deb

if [[ -e "$OUTPUT" ]]; then
  echo "$OUTPUT exists."
  rm -r "$TMPDIR"
  exit 1

dpkg-deb -x "$DEBFILE" "$TMPDIR"
dpkg-deb --control "$DEBFILE" "$TMPDIR"/DEBIAN

if [[ ! -e "$TMPDIR"/DEBIAN/control ]]; then
  echo DEBIAN/control not found.

  rm -r "$TMPDIR"
  exit 1


MOD=`stat -c "%y" "$CONTROL"`

if [[ "$MOD" == `stat -c "%y" "$CONTROL"` ]]; then
  echo Not modfied.
  echo Building new deb...
  dpkg -b "$TMPDIR" "$OUTPUT"

rm -r "$TMPDIR"

Same the file as, and make it executable with chmod +x

Then, run deb_file_output.deb for the file, and edit the correct line (or add it). Save, and then use your newly created .deb file to distribute.


share|improve this answer

One answer already tells you how to add dependencies, I will try to answer your question about the perception of DEBs without dependency checks:

There are two reasons for DEB files (in this context and as I see it):

  1. Provide a combination of "tar", "make" and "make install". By that I mean that the software comes in a single file, as other software comes in a tar-archive and can be installed with a single command, like other software, which often comes with an installation script. So aunpack <packagename>.tar.gz; cd <packagename>; make; make install can be replaced with dpkg -i <packagename>.deb.
  2. Make sure, via dependencies and previous tests with the OS version it is provided for, that everything just works and that everything can be managed (installed, uninstalled) without problems.

While the command in 1) is slightly shorter than its alternative, it is from my point of view not worth the trouble and only point 2) makes a deb package useful.

SO: if you want to create a DEB package, you have to take care of both: dependency checks and tests with the OS version. If you do not include dependency checks or tests, your users (Ubuntu or Debian) will be very disappointed. Creating a DEB package without dependency checks is like cheating, making the user belief you did something for them which you did not.

My advice would be: if you don't want to add the checks by hand, do not generate a DEB package at all. Provide a short line of information that says something like "Install the software by running". Then users know what to expect.

share|improve this answer
Thank you very much for your answers. It gives me a good insight on the subject matter. Much appreciated. – user98662 Oct 24 '12 at 0:25
Thanks. Feel free to upvote my answer, which is usually to way to say "the answer is good". If after a while you feel like one answer is good enough so that the question can be considered answered, you can also accept one of the answer (then click on the check mark beside the question). – xubuntix Oct 24 '12 at 7:02

Your Answer


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

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