E: Could not perform immediate configuration on 'exim4-daemon-light'. Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)
If you came across this error trying to install exim4 here's the solution.
Run the commands in the following order:
sudo apt-get install exim4-base exim4-config
sudo apt-get install exim4-daemon-light