Coxeroni
Posts: 7
Joined: Fri Jul 20, 2012 6:18 pm

Hash fail after apt-get update

Sun Sep 23, 2012 10:53 am

Since yesterday I am getting the following error after updating the package list:

Code: Select all

W: Size of file /var/lib/apt/lists/partial/mirror.et.uni-paderborn.de_raspbian_r
aspbian_dists_wheezy_main_binary-armhf_Packages is not what the server reported
7368242 9454002
W: Failed to fetch gzip:/var/lib/apt/lists/partial/mirror.et.uni-paderborn.de_ra
spbian_raspbian_dists_wheezy_main_binary-armhf_Packages  Hash Sum mismatch
 
E: Some index files failed to download. They have been ignored, or old ones used
 instead.
Deleting that file and changing the mirror didnt change anything.
Am I the only one with that problem and how to solve it?

Thanks in advance

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Hash fail after apt-get update

Sun Sep 23, 2012 8:58 pm

Seems like a problem with the mirror you are using. Either wait a bit to see if it clears up or use a different mirror.

t-47
Posts: 3
Joined: Sun Sep 23, 2012 8:28 pm

Re: Hash fail after apt-get update

Mon Sep 24, 2012 6:50 pm

i'm getting this too. i'm also getting a 404 Not Found when trying to install motion but i don't know if this is related or not since i'm a bit new to repositories and such

Failed to fetch http://mirrordirector.raspbian.org/rasp ... _armhf.deb 404 Not Found

when looking in the above directory i see that libpq5_9.1.5-1_armhf.deb must have been replaced with libpq5_9.1.5-2_armhf.deb on 21/09/12.

does someone need to be notified of this or is it just one of those things that i just have to wait for?

thanks.

btw. i did apt-get update beforehand, yes.

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Hash fail after apt-get update

Mon Sep 24, 2012 8:47 pm

Can you try running apt-get update again.

t-47
Posts: 3
Joined: Sun Sep 23, 2012 8:28 pm

Re: Hash fail after apt-get update

Mon Sep 24, 2012 10:38 pm

no change unfortunately...

atp-get update...

W: Failed to fetch gzip:/var/lib/apt/lists/partial/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages Hash Sum mismatch

apt-get install motion...

Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main libpq5 armhf 9.1.5-1
404 Not Found
Failed to fetch http://mirrordirector.raspbian.org/rasp ... _armhf.deb 404 Not Found

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Hash fail after apt-get update

Tue Sep 25, 2012 2:56 am

t-47 wrote: W: Failed to fetch gzip:/var/lib/apt/lists/partial/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages Hash Sum mismatch
Well theres your problem, you aren't getting the updates package lists because of a hash sum mismatch.

However I don't think it's a problem on our end because if it was we would be getting a lot more complaints. Probablly something messing with the data in transit.

How do you connect to the internet?

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Hash fail after apt-get update

Tue Sep 25, 2012 3:36 am

Please try the following

apt-get install apt-transport-https ca-certificates

Then point your sources.list at https://archive.raspbian.org/raspbian and try running apt-get update again.

Coxeroni
Posts: 7
Joined: Fri Jul 20, 2012 6:18 pm

Re: Hash fail after apt-get update

Tue Sep 25, 2012 6:52 am

plugwash wrote:Please try the following

apt-get install apt-transport-https ca-certificates

Then point your sources.list at https://archive.raspbian.org/raspbian and try running apt-get update again.
Will try that this evening, thanks.
Still news from my side:
The problem only occurred while I was connected to "my" VPN server. I disconnected, ran apt-get update and everything was fine...
So in my case there must be an issue either with the VPN itself or with the VPN and apt, which I don't have a clue what could be wrong there.

t-47
Posts: 3
Joined: Sun Sep 23, 2012 8:28 pm

Re: Hash fail after apt-get update

Tue Sep 25, 2012 10:40 am

thanks a lot plugwash. that did the trick nicely :)

kind of irrelevant now but since you asked... i connect to the internet via wifi through virgin media and i don't use a vpn. i'm using a fresh install of the 2012-09-18 Wheezy image which had no changes at the point of getting that error.

cleaver
Posts: 3
Joined: Tue Oct 02, 2012 7:40 pm

Re: Hash fail after apt-get update

Tue Oct 02, 2012 7:45 pm

I've just had exactly the same problem. I tried to change the sources.list to point to https (after aptitude install apt-transport-https), but that failed.

I've managed to resolve it by deleting the following and re-running aptitude update:

Code: Select all

/var/lib/apt/lists/partial/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages*

mage7223
Posts: 1
Joined: Fri Jan 25, 2013 6:40 pm

Re: Hash fail after apt-get update

Fri Jan 25, 2013 6:49 pm

I had the same problem and I tried deleting from the "partial" directory with no success. There is a bad mirror and I have no idea which one it is but it may be geographically constrained which would limit the persons experiencing the problem.

Here is what I did as a workaround:

Edit: /etc/apt/sources.list
Replace

Code: Select all

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
with

Code: Select all

deb http://distribution-us.hexxeh.net/raspbian/archive/raspbian/ wheezy main contrib non-free rpi
or some other appropriate value from the following list: http://www.raspbian.org/RaspbianMirrors

then

Code: Select all

sudo rm -f /var/lib/apt/lists/*
sudo rm -f /var/lib/apt/lists/partial/*
sudo apt-get update

claid89
Posts: 1
Joined: Tue Mar 12, 2013 11:34 pm

Re: Hash fail after apt-get update

Tue Mar 12, 2013 11:38 pm

Hey mage7223,

thanks, for your solution. This works fine for me :-)

Iceshadow
Posts: 4
Joined: Sun Mar 17, 2013 11:53 am

Re: Hash fail after apt-get update

Sun Mar 17, 2013 12:24 pm

I can't access etc/.... it says permission denied.
so i used nano/etc..., but still as i tried to save the changes it says: [ Error writing /etc/apt/sources.list: Permission denied ]
help please!

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Hash fail after apt-get update

Sun Mar 17, 2013 3:36 pm

You need to be root when making the changes.

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Hash fail after apt-get update

Sun Mar 17, 2013 4:04 pm

mage7223 wrote:There is a bad mirror
Unfortunately that doesn't explain the problems you are getting. The dists directory is served directly by mirrordirector.raspbian.org, it is not redirected to mirrors.

Iceshadow
Posts: 4
Joined: Sun Mar 17, 2013 11:53 am

Re: Hash fail after apt-get update

Mon Mar 18, 2013 6:37 am

Thanks you all, it workls fine now

crlsgomez
Posts: 2
Joined: Wed Mar 20, 2013 7:10 pm

Re: Hash fail after apt-get update

Wed Mar 20, 2013 7:17 pm

plugwash wrote:You need to be root when making the changes.
how do I do it as root?

crlsgomez
Posts: 2
Joined: Wed Mar 20, 2013 7:10 pm

Re: Hash fail after apt-get update

Wed Mar 20, 2013 7:39 pm

crlsgomez wrote:
plugwash wrote:You need to be root when making the changes.
how do I do it as root?
I am new to this could you explain how to do it, please

Iceshadow
Posts: 4
Joined: Sun Mar 17, 2013 11:53 am

Re: Hash fail after apt-get update

Wed Mar 20, 2013 10:14 pm

To be root, , simply write sudo -i (lol remains me of imaginery numbers)

sialm
Posts: 1
Joined: Mon May 30, 2016 11:09 pm

Re: Hash fail after apt-get update

Mon May 30, 2016 11:12 pm

I fought with this for the better part of two days.

Make your life easy and just reinstall the OS.

Return to “Raspberry Pi OS”