I'm in a bit of a pickle. I tried to upgrade a chroot'ed environment and it seems I broke dpkg in the process.
I don't know if the cause of the problems is that apt-get isn't able to handle a qmail upgrade or if it's something else (it seems snmpd also didn't "finish" during the last round).
I think the error I'm trying to address is:
E: Sub-process /usr/bin/dpkg returned an error code (1)
It seems I have a very old version of qmail, and upgrading to the one in my apt mirror is too much of a change. I've googled, and have not been able to find anything between 1.03-38 and 1.06-5 yet.
(Removed a few lines and struggled with the formatting)
# apt-get install qmail
The following extra packages will be installed:
qmail-run qmail-uids-gids
Suggested packages:
dot-forward qmail-tools
The following NEW packages will be installed:
qmail-run qmail-uids-gids
The following packages will be upgraded:
qmail
1 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
107 not fully installed or removed.
Do you want to continue [Y/n]?
Get:1 http://10.105.176.67/debian/ wheezy/main snmpd i386 5.4.3~dfsg-2.8+deb7u1 [964 kB]
Fetched 964 kB in 0s (6,685 kB/s)
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 1852018 files and directories currently installed.)
Preparing to replace qmail 1.03-38 (using .../archives/qmail_1.06-5_i386.deb) ...
Upgrading from qmail version 1.03-38 is not yet supported.
dpkg: error processing /var/cache/apt/archives/qmail_1.06-5_i386.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
rmdir: failed to remove `/var/lib/qmail': Directory not empty
insserv: warning: script 'K01qmail' missing LSB tags and overrides
insserv: warning: script 'qmail' missing LSB tags and overrides
dpkg: regarding .../qmail-uids-gids_1.06-5_all.deb containing qmail-uids-gids:
qmail conflicts with qmail-uids-gids
qmail-uids-gids (version 1.06-5) is to be installed.
dpkg: error processing /var/cache/apt/archives/qmail-uids-gids_1.06-5_all.deb (--unpack):
conflicting packages - not installing qmail-uids-gids
dpkg: regarding .../qmail-run_2.0.2_all.deb containing qmail-run:
qmail-run conflicts with mail-transport-agent
qmail provides mail-transport-agent and is present and installed.
dpkg: error processing /var/cache/apt/archives/qmail-run_2.0.2_all.deb (--unpack):
conflicting packages - not installing qmail-run
Errors were encountered while processing:
/var/cache/apt/archives/qmail_1.06-5_i386.deb
/var/cache/apt/archives/qmail-uids-gids_1.06-5_all.deb
/var/cache/apt/archives/qmail-run_2.0.2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I just ran this:
At least this got me past this problem/error with dpkg. I desperately needed to install a custom deb package.
I was getting a lot of these messages when trying to install my custom deb package:
I'm guessing my last batch of patching somehow ended with an error and dpkg wouldn't let me do anything else.
My qmail (and probably snmpd) problem remains, but I just needed to "fix" dpkg for now.