0

Was doing a package update and it ended a process and hung so I rebooted the server and now it will not allow me to perform any more updates.

I tried the following to no avail:

sudo apt-get clean
sudo apt-get install -f  (I get a message: E: DPKG was interrupted, you must manually run sudo dpkg --configure -a to correct the problem)
sudo dpkg --configure -a  (I get the following - which is where it got stuck the first time)
'Setting up citadel-server (8.03- 1)'
'sendcommand: started (pid=1692) running in 504'
'Attaching to server...'
'domain Citadel server ready'
'Authentication as an internal program.'
'DOWN'
'231 Shutting down server. Goodbye.'
sendcommand: processing ended.'

Then it all freezes and does nothing. It looks like a orphaned processes and it locks the dpkg and the citadel-server and so my mail no longer works. forcing me to reboot the server to get it back to work.

How do I fix the index so I can do future updates? Snaptic package also will not work.

Thank you

2
  • You probably ought to go back and mark answers to your past questions as "accepted".
    – EEAA
    Dec 12, 2011 at 5:16
  • How do I accept previous answers? Thank you, I will do it as soon as I figure it out. Dec 12, 2011 at 5:28

1 Answer 1

0

In /var/lib/dpkg/info each package keeps some scripts:

<pkgname>.preinst
<pkgname>.postinst
<pkgname>.prerm
<pkgname>.postrm

To complete package installation process, .preinst and .postinst scripts should be run for each unpacked package. If those scripts finish with errors, dpkg interrupts. Find that scripts for citadel-server package and investigate why they don't work. Or just replase them with empty scripts with success exit status, run dpkg --configure -a and remove citadel-server.

5
  • This does not seem to be working. First of all there is no .preinst Also is there a way I can just remove the package and what would happen if I just deleted the citadel-server.files? Dec 23, 2011 at 2:22
  • Some of this scripts may not exist for package, that's ok. No .preinst means that package doesn't need any pre-installation work. Uninstalling package manualy is not good idea until you have excellent knowledge of dpkg internals. What did you do that it doesn't work? Did you replace .prerm and .postrm with #!/bin/sh exit 0 and run dpkg-configure -a; apt-get install -f? Dec 23, 2011 at 2:37
  • No I did not try that. When I look at all of the files under /var/lib/dpkg/info I am finding that acpid.prerm and .preinst .postrm .postinst to be the last changed sheel scripts. The Citadel-Server files show up with 2 day earlier dates of Dec 6. Also there is a citadel-server.conffiles Dec 23, 2011 at 2:59
  • Also there is at the end of .prerm file 'exit 0' but there is a lot of script between it. You want me to delete all of the scripts between the #!/bin/sh and exit o? Dec 23, 2011 at 3:02
  • Ok, I removed all of the script an ran the dpkg --configure -a and it is now fixed. I reran the update manager and there were several packages it reinstalled, including php5, etc. All good now. Thanks Dec 23, 2011 at 3:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .