Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I dont understand how or why apt-get install failed. It mentions ssmtp which is simple smtp which i use to send mail from my server to my google apps account. I dont understand what is wrong or how to fix it.

I am using debian squeeze.

# apt-get install ffmpeg
Setting up libswscale0 (4:0.5.2-6) ...
Setting up ffmpeg (4:0.5.2-6) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

# sudo apt-get install ffmpeg
sudo: unable to resolve host debian
Reading package lists... Done
Building dependency tree
Reading state information... Done
ffmpeg is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 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 ssmtp (2.64-4) ...
hostname: Name or service not known
dpkg: error processing ssmtp (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
up vote 4 down vote accepted

I'm guessing that you set your system's host name to "debian" when setting it up. The installer should have added an entry for that to /etc/hosts, but it seems to not be there any longer.

Add an entry like this, if you don't see a line with "debian" on it already:    debian

You'll have to start your text editor with sudo to be allowed to save the changes.

share|improve this answer
wow, right on. I had no idea ffmpeg used email at all, before today (edit, i'll accept in 2 min when it allows me) – acidzombie24 Feb 21 '11 at 2:52

The failure is unrelated to ffmpeg, it's due to ssmtp. When you ran apt-get install ffmpeg, you already had the ssmtp package in an unpacked, but not fully-installed state, which in Debian terminology is called “installed but not configured”. That configuration stage mainly runs the package's postinst script, which typically registers the package's components with the appropriate service (shared libraries, menu entries, etc.). When apt-get install has finished installing (i.e. unpacking) the packages named on the command line and their dependencies, it “configures” every package (the underlying dpkg command is dpkg --configure --pending).

Warren Young has already explained why ssmtp couldn't be configured.

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.