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?

SNIP: err message

  • 4
    Please extract the error message from your screenshot and post it as text. – Dmitry Grigoryev Mar 28 '18 at 9:35
  • Your password to log in is raspberry. It seems you have a bad connection or a device that toggles a bit from time to time on transfer data to/from the internet. – Ingo Mar 28 '18 at 11:01

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=
    static routers=
    static domain_name_servers=

Notice the full stop on the end of the last line:

 static domain_name_servers= <=====

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

before tyring

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
  • This doesn't address the original question, at least not the part where you recommend to enable deb-src. – RalfFriedl May 31 at 6:51
  • Thanks for feedback. But, for me the whole approach solved the issue and so I listed all. – Dosto Jun 2 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.