I cannot install any packages for Ubuntu 12.04. Even after clearing files under:
/var/lib/dpkg/lists/partial/* /var/lib/dpkg/lists/*
/var/cache/apt/*
Changed the repository and tried apt-get clean
and all other resolutions provided by Ubuntu forums. Nothing worked, I had same issue before and reinstalled Ubuntu. But that is not the permanent solution.
:~$ sudo apt-get update
95% [1 Sources bzip2 0 B] [Waiting for headers] [Waiting for headers]bzip2: (stdin) is not a bzip2 file.
98% [2 Packages bzip2 0 B] [Connecting to archive.ubuntu.com (91.189.92.201)]bzip2: (stdin) is not a bzip2 file.
100% [6 Translation-en bzip2 0 B] [Waiting for headers] 154 B/s 0sbzip2: (stdin) is not a bzip2 file.
Fetched 5,722 B in 14s (403 B/s)
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_source_Sources Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_i18n_Translation-en Encountered a section with no Package: header
E: Some index files failed to download. They have been ignored, or old ones used instead.
Hope Ubuntu developers should definitely know the quick workaround to fix this. This is a very common issue for all Ubuntu users which is unsolvable. Kindly create a global FAQ answers to fix this issue.