0

When I try to update using

sudo apt-get update  

I get error

W: Failed to fetch bzip2:/var/lib/apt/lists/partial/archive.canonical.com_ubuntu_dists_precise_partner_binary-i386_Packages  Hash Sum mismatch

And if I try to install any app the error I get is,

The following packages have unmet dependencies:
icedtea-7-jre-jamvm : Depends: openjdk-7-jre-headless (= 7u55-2.4.7-1ubuntu1~0.12.04.2) but 7u65-2.5.1-4ubuntu1~0.12.04.2 is to be installed
 openjdk-7-jre : Depends: openjdk-7-jre-headless (= 7u55-2.4.7-1ubuntu1~0.12.04.2) but 7u65-2.5.1-4ubuntu1~0.12.04.2 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).  

I already referred some solutions that were given for similar problems such as,

cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get update

and

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean  

Not able to proceed with some solutions since update or installing is not possible.
What may be the reason for this problem and how can a resolve this?

David Foerster
  • 36,264
  • 56
  • 94
  • 147
LearningC
  • 101

1 Answers1

0

Backup your source.list:

cp /etc/apt/sources.list ~/sourcesBK.list

Download the "example repositories":

wget https://help.ubuntu.com/12.04/sample/sources.list

and reemplace yours:

sudo cp sources.list /etc/apt/sources.list

And try to make an update:

sudo apt-get update && sudo apt-get upgrade
ftpfly
  • 1
  • 1
  • 1
  • 3
  • Getting this error on running last command. The following packages have unmet dependencies: icedtea-7-jre-jamvm : Depends: openjdk-7-jre-headless (= 7u55-2.4.7-1ubuntu1~0.12.04.2) but 7u65-2.5.1-4ubuntu1~0.12.04.2 is installed openjdk-7-jre : Depends: openjdk-7-jre-headless (= 7u55-2.4.7-1ubuntu1~0.12.04.2) but 7u65-2.5.1-4ubuntu1~0.12.04.2 is installed E: Unmet dependencies. Try using -f. – LearningC Oct 16 '15 at 14:31
  • Try removing icedtea: sudo apt-get remove icedtea-7-jre-jamvm

    I dont know really what its de problem with icedtea, buts apparenly have broken dependens. Maybe you have same ppa or source broken.

    – ftpfly Oct 17 '15 at 22:45