Please find the attached snip, for the complete error message. This is the second time I've faced this issue, last time it happened I tried couple of different things updating source list file or apt-get clean but was of no utter use. I gave up and woke up next morning it worked effortlessly. I'm from India, so is this possible some server might be down or could be ISP's issue? Is this issue specific to Raspbian Jessie? Suggest any resolution for this?
I just had the same issue with that same link. The only difference being that I am on stretch while you are on jessie. I resolved it by modifying my
/etc/apt/sources.list to use a different mirror. I used a local mirror instead of the main raspberrypi.org repo.
Take a look at https://www.raspbian.org/RaspbianMirrors/ for a mirror local to you, update the repo URL in
/etc/apt/sources.list, comment out the existing one that fails, and then retry the update.
That worked for me. Hopefully it will work for you too. If it still fails, try a couple more mirrors just in case there has been a bad sync.
I had an issue with the error you have on the last line of your error log "E: Some index files failed ..."
For me, this was caused by an entry in the /etc/dhcpcd.conf file. Basically, I opened this file and noticed that the WiFi static IP address setup was incorrect ...
interface wlan0 static ip_address=192.168.0.32/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.1.
Notice the full stop on the end of the last line:
static domain_name_servers=192.168.0.1. <=====
I simply removed the full stop and saved the file, restarted the Pi and all worked good.
I used the command "sudo nano /etc/dhcpcd.conf" (without the quoted) to enable me to edit this file. I suspect there are probably cleaner ways of making this change, but for me, this did the job! :D
This same problem often happens to me when my Raspberry Pi's system time is too far off from the actual UTC time, as it usually is when I first try to do a
sudo apt-get update. This is because the Raspberry Pi doesn't have a hardware clock and needs needs to use ntp to sync up.
Try running the
date command on your Raspberry Pi to see if its system time is more than a few minutes off from UTC time (which can be found here).
If it is, you can run this command to sync back up:
sudo sntp -s time.google.com
You may also need to run
sudo rm -rf /var/lib/apt/lists/partial
sudo apt-get update
I have been facing this issue for a while and finally I figured out. Here I just want to post my approach even if the question is old.
Let's clean some temporary files:
sudo apt-get clean sudo rm /var/lib/apt/lists/partial/*
Then, we can uncomment some a line from:
sudo nano /etc/apt/sources.list
In my case, the file was like this:
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' # deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
As you can see from above, i was asked to uncomment and i did it.
Updating public key:
wget https://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -
Please, pay attention for https and then everything went smooth.
sudo apt-get update
It is possible you changed something in your list of repositories or it may even occur from a corrupted file. When you run
sudo apt-get update (or use the Refresh button in a package manager), a list of packages will get downloaded from the Ubuntu servers. These files are then stored in /var/lib/apt/lists/. If I'm ever having issues running update my last resort is to delete the list and rerun update i.e.
sudo rm /var/lib/apt/lists/* -vf sudo apt-get update