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

Jenny D
  • 27,780
  • 21
  • 75
  • 114
Ubuntu User
  • 71
  • 2
  • 3
  • 11

1 Answers1

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.

Selivanov Pavel
  • 2,206
  • 3
  • 26
  • 48
  • 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? – Ubuntu User Dec 23 '11 at 02: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`? – Selivanov Pavel Dec 23 '11 at 02: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 – Ubuntu User Dec 23 '11 at 02: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? – Ubuntu User Dec 23 '11 at 03: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 – Ubuntu User Dec 23 '11 at 03:44