2

When opening Synaptic Package Manager following error occurs:

An error occurred

The following details are provided:

E: Deformed line 1 in sources list /etc/apt/sources.list.d/canonical_partner.list (»URI«)
E: The list of sources could not be read.
Go to the repository dialog to correct the problem.
E: _cache->open() failed, please report.

What i have to do to correct this?

TuKsn
  • 4,370
  • 2
  • 26
  • 43
user230139
  • 39
  • 4

3 Answers3

4

I'll answer in English. I also know German a bit...but please, try to write in English. I am not english either, and I make this effort. EDIT: Thanks to Xubu-tur for the translation

Try this: How do I restore the sources.list file? Probably the sources.list file is corrupted, or something similar. You could try to restore it from the installation media, or downloading it from http://repogen.simplylinux.ch/ (I think that restoring from installation media is always better...)

2

Your /etc/apt/sources.list.d/canonical_partner.list file is corrupted not /etc/apt/sources.list. So try to replace the contents in that file by running the below command on terminal,

var=$(lsb_release -c | awk '{print $2}'); sudo sed -ri "1s:^(.*)$:deb http\:\/\/archive.canonical.com\/ $var partner:g" /etc/apt/sources.list.d/canonical_partner.list

It replaces the corrupted line with the accurate line for your Ubuntu release.

And finally don't forget to update the repositories by running sudo apt-get update command on terminal.

Avinash Raj
  • 78,556
1

I just had the same problem. The above command did not work at all. But upon inspection of the sources.list file, I saw a line that didn't belong there. I remember trying to add a custom package path. (it didn't work btw) This manual adding of a location was done within the package manager itself. This method cant be used again since the package manager doesn't launch any more because of the line I added. Trying to remove the line using text editor did not work either. The file would only open in read only mode.

Run terminal as root or super user. (YOU ARE ABOUT TO USE A VERY POWERFUL TOOL IN SUPERUSER MODE. BE VERY CAREFUL) type:

vi /etc/apt/sources.list

This should open a text editor within the terminal

use arrow keys to navigate to the invalid line.

ALL VALID LINED SHOULD START WITH DEB

on your keyboard tap dd while the cursor is in the invalid line (the d key x2)

NOWHERE ELSE

If the line is successfully removed, hold down shift and tap zz (the z key x2)

Rather exit the terminal and call a professional if something goes wrong.

ferret
  • 11