Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I've created *.deb package with a postinst script. On some hosts it works with errors:

subprocess post-installation script returned error exit status 1

Is there a place where these errors are logged so I can have more detailed info (line # and error message, for instance) in order to troubleshoot postinst script?

My script has set -e, so the error can be anywhere, and the code tells me nothing.

Thanks in advance.

share|improve this question
up vote 4 down vote accepted

dpkg can't tell where your script failed -- it's not omniscient. Your script returned 1, that's all dpkg knows. The easiest way to debug this is to set -x in the script and have all the debugging output dumped that you could possibly wish for.

share|improve this answer

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.