1

whenever I try to install something or either use Software center or apply an update, I got error 'E: Malformed line 56 in source list /etc/apt/sources.list (dist)'. I have already consulted this thread How do I remove a malformed line from my sources.list?, for example... but whatever I had done, the problem continued to exist. May I feel free and post a http://paste.ubuntu.com/22934876/, so some of you could see what does go wrong?

3 Answers3

1

See lines 56 and 57:

deb http://archive.canonical.com/ partner
deb-src http://archive.canonical.com/ partner
deb http://archive.canonical.com/ precise partner
deb-src http://archive.canonical.com/ precise partner

They are missing a parameter the other lines do have "precise".

Use an editor to remove the 2 lines since lines 58 and 59 already are the correct versions of these 2.

Rinzwind
  • 299,756
0

i already did something to where the text editor doesnt come up the same but you are supposed to put these command first.

sudo cp /etc/apt/source.list  /etc/apt/source.list.old 
sudo cat -n /etc/apt/source.list | grep 2
sudo gedit /etc/apt/source.list

on the second command right where it says "grep 2" you are supposed to put the number of lines you have that are malformed into the command. and i believe you are supposed to put a number sine where the link starts in the test editor followed but a space and then hit save. on your terminal it should say something like this..

$ sudo gedit /etc/apt/source.list
** (gedit:3452): WARNING **: 21:16:30.900: Set document metadata failed: Setting attribute metadata::gedit-position not supported

once it does that exit out of text editor and start a new terminal and start a apt-update && upgrade to see if you can source code an update.

muru
  • 197,895
  • 55
  • 485
  • 740
right
  • 11
0

Both lines 56 and 57 are not ok. The correct syntax is:

deb http://archive.canonical.com/ubuntu precise partner
deb-src http://archive.canonical.com/ubuntu precise partner

The correct lines are 50 and 51 but they are commented out. Delete the incorrect ones and remove the # from the beginning of 50 and 51. Lines 58 and 59 should be removed too. They are incorrect too. Lines 50 and 51 cover all of them.

Stormlord
  • 6,317