Monday, February 26, 2024
 Popular · Latest · Hot · Upcoming
rated 0 times [  11] [ 0]  / answers: 1 / hits: 17610  / 2 Years ago, tue, may 3, 2022, 3:56:59

I have a machine who is using Apt-Cacher NG running on another machine as caching proxy.

When I try to run sudo apt-get update I get the following errors:

W: Failed to fetch gzip:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_oneiric-updates_main_source_Sources  Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_oneiric-updates_main_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_oneiric-updates_universe_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_oneiric-updates_main_binary-i386_Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.

The directory /etc/apt/sources.list.d is empty.

To fix that I have already tried the following with no success:

Solution 1:

sudo rm -fr /var/lib/apt/lists
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get autoclean

Solution 2:

sudo apt-get update -o Acquire::http::No-Cache=True

Any suggestion?

More From » networking


I would suggest to switch away from APT-cacher-ng and check out Squid-deb-proxy.

APT-cacher-ng has proven to be very buggy in my experience and tons of bug reports are outstanding. Only recently it has been proposed again to get unblocked in Debian now that some major bugs are squashed. For Ubuntu I've switched to Squid-deb-proxy a long time ago and I don't regret it. It's a great alternative and the best APT-cacher I've come around.

For Squid-deb-proxy, just install the package squid-deb-proxy and add allowed destination domains in a new file in /etc/squid-deb-proxy/mirror-dstdomain.acl.d. As a bonus, clients can auto-discover caching-enabled machines in the local network by having the squid-deb-proxy-client package installed.

[#39456] Wednesday, May 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 93
Total Questions: 113
Total Answers: 107

Location: Cyprus
Member since Mon, Oct 24, 2022
1 Year ago