apt-get update fails


6 posts
by Atalon » Sat Sep 28, 2013 8:27 pm
apt-get update fails

This happens both before and after a re-install of raspbian.


W: Failed to fetch gzip:/var/lib/apt/lists/partial/mirrordirector.raspbian.org_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.
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Posts: 4
Joined: Sat Sep 28, 2013 8:20 pm
by SirLagz » Sun Sep 29, 2013 7:29 am
Are you using sudo when running apt-get update ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by Atalon » Sun Sep 29, 2013 1:09 pm
yes I used sudo, I even did su - root and tried it with the same results.
Posts: 4
Joined: Sat Sep 28, 2013 8:20 pm
by Atalon » Sun Sep 29, 2013 4:55 pm
is there a way to rebuild the file or is it bad from the source?
Posts: 4
Joined: Sat Sep 28, 2013 8:20 pm
by rpdom » Sun Sep 29, 2013 5:19 pm
One thing I would do is to check that there is enough free space for the file, using "df -h /".

Then I would try to remove the corrupt file(s) with "sudo rm /var/lib/apt/lists/partial/*".

Finally, try the "sudo apt-get update" again.
Posts: 2526
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK
by Atalon » Mon Sep 30, 2013 2:10 am
removing the partial files worked great.

Thanks!

I knew I had enough space because I am using a 32 GB SD card.
Posts: 4
Joined: Sat Sep 28, 2013 8:20 pm