Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.