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?
W: Failed to fetch ...
andThe following packages have unmet dependencies: ...
are actually two unrelated problems. The former is just a warning, so my suggestion relates to the latter: possible duplicate of How do I resolve unmet dependencies after adding a PPA? – David Foerster Oct 15 '15 at 23:19