1

How do I fix this major issue:

E: Type 'sudo' is not known on line 3 in source list /etc/apt/sources.list.d/libdvdcss.list

What do I do to fix this?

This is what I get when I open Synaptic Package Manager:

E: Type 'sudo' is not known on line 1 in source list /etc/apt/sources.list.d/libdvdcss.list
E: The list of sources could not be read.
Go to the repository dialog to correct the problem.
E: _cache->open() failed, please report.

These are the file's contents:

sudo tee -a /etc/apt/sources.list.d/libdvdcss.list
sudo apt-key add -
sudo apt-get update

sudo apt-get upgrade
[B[Bsudo apt-get update
Tim
  • 32,861
  • 27
  • 118
  • 178

1 Answers1

4

It appears you made a mistake (or followed bad instructions) while attempting to add a software source for libdvdcss. Since your libdvdcss.list contains nothing of value--just terminal commands, where instead there should be deb lines--you can simply delete that file, then update the package manager's information about available software:

sudo rm /etc/apt/sources.list.d/libdvdcss.list
sudo apt-get update

Run those commands in a Terminal window (Ctrl+Alt+T). If you get no errors from either of those commands, the problem should be fixed.

Alternatively, if you prefer to fix the problem with a GUI tool, open Software & Updates (on older versions of Ubuntu, it's called Software Sources), go to the Other Software tab, find the entry that looks different from the others (and has sudo in it), and disable it by unchecking it. When you close the dialog, you'll be told "The information about available software is out-of-date"; click Reload.

You don't have to follow both the command-line and GUI ways of solving this problem; either one by itself should be sufficient. (Though if you try one way and have difficulties, you could then try the other.)


You'll probably still want to achieve whatever you were trying to do when you ran the commands that produced a malformed libdvdcss.list file. Since I don't know specifically what that is, I cannot point you to advice to achieve it in precisely the way you had hoped. However, my guess is that you were trying to set up Ubuntu so that it will play encrypted (i.e., CSS-encumbered) DVDs.

To do that, see How can I play encrypted DVD movies?. Likely it will be sufficient simply to follow mac9416's advice and run:

sudo apt-get install libdvdread4
sudo /usr/share/doc/libdvdread4/install-css.sh
Eliah Kagan
  • 117,780