Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

if I run

# apt-get install sendmail
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 sendmail : Depends: sendmail-bin but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

it works if I add sendmail-bin to the apt-get install command, but on Squeeze it was not necessary
why I have to specify some dependencies on Wheezy?


If I remove exim4 packages, then apt-get install sendmail works, seems something related to package dependencies


now I tested on squeeze and it's the same!
my trouble is puppet squeeze manifests are not working on wheezy, thought apt changed something but seems not, sorry about that

share|improve this question
Just to check... Did you run apt-get update first? – Bruno Jul 9 '13 at 13:25
yes, I did, and apt-get install sendmail sendmail-bin works – tictacbum Jul 9 '13 at 13:29

3 Answers 3

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.

share|improve this answer
It is a fresh Wheezy install and there aren't held packages, also I tested on many computers with same behavior – tictacbum Jul 9 '13 at 20:36

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 ;-\

share|improve this answer
I tried it again with vagrant with a wheezy 64 bits box downloaded from, just after first vagrant up I have this problem, same after apt-get update && apt-get upgrade, have you tried with 32 or 64 bits? – tictacbum Jul 10 '13 at 6:46
I tried again with a fresh Wheezy installation, without exim4 it doesn't happen – tictacbum Jul 10 '13 at 16:37

When apt is trying to find a soloution to what you tell it to do it allocates scores to different possibilities. Some actions (like removing packages) are considered "bad" and given negative scores. If the score gets too bad it will bail out.

Unfortunately sometimes it bails out a bit too easily and doesn't end up doing what you want (remove whatever MTA was there before and install sendmail) until you give it more explicit instructions.

Things will go more smoothly if you don't select the "standard system utilities" task during install and you install your MTA of choice before installing stuff that needs a MTA.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.