M BUZZ CRAZE NEWS
// general

How do I fix an error in my apt sources list? [duplicate]

By Jessica Wood

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 information

How can I fix this?

0

1 Answer

Your problem is not bad so do not worry, simply do the following:

  1. Remove the file sources.list
    sudo rm -fr /etc/apt/sources.list

  2. Run 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.

1