Whenever you try to install any packages may get an error like below,

"E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)".

For example, If you try to install apache server,

# sudo apt-get install apache2

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 apache2 : Depends: apache2-bin (= 2.4.7-1ubuntu4.1) but it is not going to be installed
           Depends: apache2-data (= 2.4.7-1ubuntu4.1) but it is not going to be installed
 teamviewer9 : Depends: libc6-i386 (>= 2.4) but it is not going to be installed
               Depends: lib32asound2 but it is not installable
               Depends: lib32z1 but it is not going to be  installed
               Depends: ia32-libs but it is not installable

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Solution:

Execute below commands,
 
# sudo apt-get clean

# sudo apt-get autoclean

Reading package lists... Done
Building dependency tree       
Reading state information... Done

Clear the local repository of retrieved package files like .deb and removes lock file from /var/cache/apt/archives/
 
# sudo apt-get -f install

-f specify for fix broken

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done

Finally, you can  install easily any packages.
 
# sudo apt-get install apache2