3

I have updated the /etc/apt/sources.list file and ended up breaking it. I've restored it to its original contents from my backup as follows

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

Now when I run sudo apt-get update I still get the same error message

E: Type 'deb' is not known on line 1 in source list /etc/apt/sources.list
E: The list of sources could not be read.

Every other thread I've found related to this problem has said that it's a malformed line and it can be fixed by restoring the contents, but having looked at every single character with my eyelids peeled back, I can't see any differences from the original contents.

How can I fix this problem?

  • I ended up recovering the original OS, and the file's contents are visually the same. My problem is now sorted, but I'm leaving this question up in case anyone finds a solution that doesn't involve completely overwriting their system. – Dan Rayson Apr 16 at 13:02

Your Answer

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

Browse other questions tagged or ask your own question.