why apt is not installing dependencies on Wheezy?

Looking more closely at the error message, it looks like you have "held" packages ("E: Unable to correct problems, you have held broken packages").

You can hold packages in Debian, preventing them from being upgraded (e.g. if you're aware of a bug that would cause you problems in a newer version).

You should be able to find which packages are on hold using:

dpkg --get-selections | awk '{if ($2 == "hold") print $0;}'

My guess is that your current sendmail-bin is held back, which apt-get install sendmail wouldn't address, but apt-get install sendmail sendmail-bin would install, upgrade and remove the hold status if necessary.


I ran this on a fresh debian wheezy install and it worked fine. Something in your setup is wrong. Did you try to do this first?

apt-get update
apt-get upgrade

When I hit upon such issues doing an upgrade will tell you something is wrong and suggest a fix, such as:

apt-get -f install

Now off to install exim and remove sendmail ;-\