How do I fix an error in my apt sources list? [duplicate]
Possible Duplicate:
How do I fix this “E:Type ‘*’ is not known on line * in source list …” update error?
I type sudo sh -c 'echo "[some repository]" >> /etc/apt/sources.list, but, then I get this message:
bash: /etc/apt/sources.list: Permission denied` And it doesn't work.
And now, when I type sudo apt-get update or open the Update Manager, the system just shows me the error message:
E: Type '[some repository]' is not known on line 62 in source list /etc/apt/sources.list
E: The list of sources could not be read.**Or:
could not initialize the package informationHow can I fix this?
01 Answer
Your problem is not bad so do not worry, simply do the following:
Remove the file sources.list
sudo rm -fr /etc/apt/sources.listRun the update process. It will create the file again
sudo apt-get update
Now, if you really want to know what is wrong or why it happened then do the following:
sudo nano +62 /etc/apt/sources.list
This will take you to the line with the problem and should give you an idea of why it is failing if compared to other lines. In most cases like this, I simply delete the file and then update to recreate it. Saves me time. But if I want to know what really happened, I do the last line first.
1More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"