For several months now, I’ve been getting an error every time I tried to do an upgrade of my ubuntu system:
Converting from /var/lib/cyrus/deliver.db (berkeley-nosync) to /tmp/deliver.db.cOT3kOvz (skiplist) fatal error: can't open old database dpkg: error processing cyrus-common-2.4 (--configure): subprocess installed post-installation script returned error exit status 75 dpkg: dependency problems prevent configuration of cyrus-pop3d-2.4: cyrus-pop3d-2.4 depends on cyrus-common-2.4 (= 2.4.12-2); however: Package cyrus-common-2.4 is not configured yet. dpkg: error processing cyrus-pop3d-2.4 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of cyrus-pop3d: cyrus-pop3d depends on cyrus-pop3d-2.4; however: Package cyrus-pop3d-2.4 is not configured yet. dpkg: error processing cyrus-pop3d (--configure): dependency problems - leaving unconfigured
I tried removing cyrus altogether. But there were so many inter-dependencies that it wasn’t an option.
I finally found a clue as to how to fix it here, but I had to modify it a bit for my own situation.
I moved the deliver.db and tls_sessions.db files, then ran the upgrade command and voila! everything worked!
sudo su - cd /var/lib/cyrus mv deliver.db deliver.db.old mv tls_sessions.db tls_sessions.db.old
Once the upgrades are done, the ‘old’ files can be removed. Yes, you might be able to get away with just deleting those files in the first place. But I like to play it safe.
Note: does this mean that there may be local mail not delivered? It could. But my local mail is only used for notifications, so it wasn’t a big deal to me.