Exim4 fails to update

All of these issues are on gateway only. I have not been able to remove exim with purge as it produces the same error. These problems began after attempting to update my virtualbox install from Whonix 15 to 16. Any advice would be appreciated.

Thanks!

----- Begin Log -----

`

user@host:~$ sudo apt upgrade
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Calculating upgrade… Done
The following packages have been kept back:
grub-live
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up exim4-config (4.94.2-7) …
/usr/sbin/update-exim4.conf: 467: /usr/sbin/exim4: Operation not permitted
Invalid new configfile /var/lib/exim4/config.autogenerated.tmp, not installing
/var/lib/exim4/config.autogenerated.tmp to /var/lib/exim4/config.autogenerated
dpkg: error processing package exim4-config (–configure):
installed exim4-config package post-installation script subprocess returned error
exit status 1
dpkg: dependency problems prevent configuration of exim4-base:
exim4-base depends on exim4-config (>= 4.94) | exim4-config-2; however:
Package exim4-config is not configured yet.
Package exim4-config-2 is not installed.
Package exim4-config which provides exim4-config-2 is not configured yet.

dpkg: error processing package exim4-base (–configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of exim4-daemon-heavy:
exim4-daemon-heavy depends on exim4-base (>= 4.94.2); however:
Package exim4-base is not configured yet.

dpkg: error processing package exim4-daemon-heavy (–configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
exim4-config
exim4-base
exim4-daemon-heavy
E: Sub-process /usr/bin/dpkg returned an error code (1)

`

Use --no-install-recommends

Upstream issue. → Potential Solutions Beyond Whonix!

Still doesn’t work.

user@host:~$ sudo apt-get install --no-install-recommends
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up exim4-config (4.94.2-7) ...
/usr/sbin/update-exim4.conf: 467: /usr/sbin/exim4: Operation not permitted
Invalid new configfile /var/lib/exim4/config.autogenerated.tmp, not installing 
/var/lib/exim4/config.autogenerated.tmp to /var/lib/exim4/config.autogenerated
dpkg: error processing package exim4-config (--configure):
 installed exim4-config package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of exim4-base:
 exim4-base depends on exim4-config (>= 4.94) | exim4-config-2; however:
  Package exim4-config is not configured yet.
  Package exim4-config-2 is not installed.
  Package exim4-config which provides exim4-config-2 is not configured yet.

dpkg: error processing package exim4-base (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of exim4-daemon-heavy:
 exim4-daemon-heavy depends on exim4-base (>= 4.94.2); however:
  Package exim4-base is not configured yet.

dpkg: error processing package exim4-daemon-heavy (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 exim4-config
 exim4-base
 exim4-daemon-heavy
E: Sub-process /usr/bin/dpkg returned an error code (1)

--no-install-recommends is functional - but only on a system without a broken APT state.

sudo apt-get install --no-install-recommends isn’t a command in itself. It’s useful when installing packages.

Once exim or any package was half installed, you’re left with the broken APT state. Try:

sudo apt purge "exim*"

Upstream issue. → Information Booster might be Available!

Or try:

sudo dpkg --force-all --purge "exim4-config"

And repeat for any other packages.

Until APT is back to a non-broken state. Make sure a meta package is installed.

Don’t be discouraged by 1 failing command. The abstract task is “purge exim” and “repair APT”. You can switch back and forth between the two commands. Make good use of Information Booster might be Available!

That seems to have worked. I had ran the purge command before and it didn’t work at all. I had made sure to do as much research and troubleshooting as possible before I had contacted you guys. Thank you. I definitely should have created a backup for my gateway because the update from Whonix 15 to 16 was not smooth, and I’m still trying to figure out why my workstation can’t connect. I might create another forum post asking how to fix systemcheck (command not found).

Thanks again!

user@host:~$sudo apt purge "exim*""
[sudo] password for user:         
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'exim4' for glob 'exim*'
Note, selecting 'exim-tls' for glob 'exim*'
Note, selecting 'eximon' for glob 'exim*'
Note, selecting 'exim' for glob 'exim*'
Note, selecting 'eximdoc4-html' for glob 'exim*'
Note, selecting 'exim4-config' for glob 'exim*'
Note, selecting 'exim4-dev' for glob 'exim*'
Note, selecting 'exim4-base' for glob 'exim*'
Note, selecting 'exim4-daemon-custom' for glob 'exim*'
Note, selecting 'eximdoc4-info' for glob 'exim*'
Note, selecting 'exim4-doc-html' for glob 'exim*'
Note, selecting 'exim4-config-2' for glob 'exim*'
Note, selecting 'exim4-doc-info' for glob 'exim*'
Note, selecting 'exim4-daemon-light' for glob 'exim*'
Note, selecting 'eximon4' for glob 'exim*'
Note, selecting 'exim4-daemon-heavy' for glob 'exim*'
Note, selecting 'exim4-localscanapi-4.1' for glob 'exim*'
Package 'exim4-daemon-custom' is not installed, so not removed
Note, selecting 'exim4-config' instead of 'exim4-config-2'
Package 'exim' is not installed, so not removed
Package 'exim-tls' is not installed, so not removed
Package 'eximon' is not installed, so not removed
Package 'eximdoc4-html' is not installed, so not removed
Package 'eximdoc4-info' is not installed, so not removed
Package 'exim4' is not installed, so not removed
Package 'exim4-daemon-light' is not installed, so not removed
Package 'exim4-dev' is not installed, so not removed
Package 'eximon4' is not installed, so not removed
Package 'exim4-doc-html' is not installed, so not removed
Package 'exim4-doc-info' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libgnutls-dane0 libpq5 libunbound8
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  exim4-base* exim4-config* exim4-daemon-heavy*
0 upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
3 not fully installed or removed.
After this operation, 4,494 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 131488 files and directories currently installed.)
Removing exim4-daemon-heavy (4.94.2-7) ...
Removing exim4-base (4.94.2-7) ...
Removing exim4-config (4.94.2-7) ...
Processing triggers for man-db (2.9.4-2) ...
(Reading database ... 131354 files and directories currently installed.)
Purging configuration files for exim4-base (4.94.2-7) ...
Purging configuration files for exim4-daemon-heavy (4.94.2-7) ...
Purging configuration files for exim4-config (4.94.2-7) ...
dpkg-statoverride: warning: no override present
dpkg: warning: while removing exim4-config, directory '/var/lib/exim4' not empty
 so not removed

Also is Exim4 required? I tried reinstalling it and got this message:

user@host:~$ sudo apt install exim*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'exim4' for glob 'exim*'
Note, selecting 'exim-tls' for glob 'exim*'
Note, selecting 'eximon' for glob 'exim*'
Note, selecting 'exim' for glob 'exim*'
Note, selecting 'eximdoc4-html' for glob 'exim*'
Note, selecting 'exim4-config' for glob 'exim*'
Note, selecting 'exim4-dev' for glob 'exim*'
Note, selecting 'exim4-base' for glob 'exim*'
Note, selecting 'exim4-daemon-custom' for glob 'exim*'
Note, selecting 'eximdoc4-info' for glob 'exim*'
Note, selecting 'exim4-doc-html' for glob 'exim*'
Note, selecting 'exim4-config-2' for glob 'exim*'
Note, selecting 'exim4-doc-info' for glob 'exim*'
Note, selecting 'exim4-daemon-light' for glob 'exim*'
Note, selecting 'eximon4' for glob 'exim*'
Note, selecting 'exim4-daemon-heavy' for glob 'exim*'
Note, selecting 'exim4-localscanapi-4.1' for glob 'exim*'
Note, selecting 'exim4-config' instead of 'exim4-config-2'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 exim4-daemon-heavy : Conflicts: mail-transport-agent
 exim4-daemon-light : Conflicts: mail-transport-agent
E: Unable to correct problems, you have held broken packages.

At time of writing, no.

As soon as you made sure a meta package is installed as per Debian Packages - Whonix there won’t be missing packages.

Same. Make sure a meta package is installed.