title: Unable to install git - Unmet dependencies error (Ubuntu 11.10)
body: <p>when i try to install git (<code>sudo apt-get install git</code>), I get following error:</p>
  
  <pre><code>root@ServerC--Frrole2:/usr/tomcat/apache-tomcat-7.0.25# sudo apt-get install git
  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:
   git : Depends: liberror-perl but it is not going to be installed
         Depends: git-man (&gt; 1:1.7.5.4) but it is not going to be installed
         Depends: git-man (&lt; 1:1.7.5.4-.) but it is not going to be installed
   sun-java6-jre : Depends: sun-java6-bin (&gt;= 6.26-2natty1) but it is not going to be installed or
                            ia32-sun-java6-bin (&gt;= 6.26-2natty1) but it is not going to be installed
                   Recommends: gsfonts-x11 but it is not going to be installed
  E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
  </code></pre>
  
  <p>If anyone know how to fix this, please HELP!</p>
  
  <p>EDIT:</p>
  
  <hr>
  
  <p>Now, after running some more commands. I get following state.</p>
  
  <pre><code>root@ServerC--Frrole2:/usr/tomcat/apache-tomcat-7.0.25# apt-get install git
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  E: The package sun-java6-jre needs to be reinstalled, but I can't find an archive for it.
  </code></pre>
  
  <p>I don't know what installing git has to do with installation of Java. I have java installed with tomcat already. </p>
  
  <pre><code>root@ServerC--Frrole2:/usr/tomcat/apache-tomcat-7.0.25# which java
  /usr/tomcat/jdk1.7.0_02/bin/java
  </code></pre>