2008-06-20

When apt-get install hangs

I encountered problems with error prone configuration processed by apt-get. Its usually fault of post-installation scripts. My diagnostic procedure is as follow:

  1. strace -f -o /tmp/strace.log apt-get install whatever

  2. less /tmp/strace.log and search of the package name from the end

  3. If the problem is with post-installation script, you will find some errors around /var/lib/dpkg/info/whatever.postinst

  4. Edit it and inspect why it can/can't start/stop service (for example)



Particularly in the last case /var/lib/dpkg/info/snmpd.postinst called

. /usr/share/debconf/confmodule

which hung. All script returned code error much higher then 0 :-)

How to fix it is another story.

No comments: