Running into trouble with Synaptic and other things

Asked by E. Mark Mitchell

I've been trying to install the latest version of Java, and it hasn't been working. Most recently, I've run into issues opening up Synaptic Package Manager, but I've run into the same problem at other steps. I'll try and do something, and I get this error message:

E: Malformed line 54 in source list /etc/apt/sources.list (dist parse)

When it happened the once, I figured it was for that particular directory/command. Now it happens with the Synaptic thing, and I figure that's a problem, since it won't run the Package Manager, and that's kind of important.

So, what do I do to fix it?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
E. Mark Mitchell
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

can you give the output of:

head -n 54 /etc/apt/sources.list | tail -n 1

Thanks

Revision history for this message
E. Mark Mitchell (bbanzai123) said :
#2

bbanzai@little-sparky:~$ head -n 54 /etc/apt/sources.list | tail -n 1
deb http://archive.canonical.com/lucid partner
bbanzai@little-sparky:~$

That's pretty much it.

Revision history for this message
arochester (arochester) said :
#3

If you click on the blue above " http://archive.canonical.com/lucid" it says that the link is dead. If you google it, it seems to refer to Sun-Java.

I would kill the line just not by putting at the front of it: #
so that it reads: # deb http://archive.canonical.com/lucid partner

(You can edit your sources list by opening a Terminal and issuing the command: gksudo gedit /etc/apt/sources.list)

Have you installed ubuntu-restricted-extras, which will install. among other things, Sun-Java?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

The line should be:

deb http://archive.canonical.com lucid partner

You seem to have added a slash...

Revision history for this message
E. Mark Mitchell (bbanzai123) said :
#5

arochester: You seem to misunderstand. I'm not entering that line, that's what the system gives me once I enter in the "head" command actionparsnip suggested. However, you are correct in that all this came about because I've been trying to install the most recent update of Java. And I started getting the error message I mentioned in the original post. I appreciate your input, but I don't know that it is applicable to my case, so I'll wait to employ it.

actionparsnip: Okay, I didn't add a slash. You asked me to give the output of your command, and I just copy/pasted the result. Let me try it again.

Okay, I copy your requested command, and paste it into the command line. Then it spits out the one line, and gives me a new command prompt. The one line, copied again from my recent attempt, is this one:

deb http://archive.canonical.com/lucid partner

I didn't add anything. If there's an extra slash, that's what my computer is giving me. Is this what is making my system give me that error command?

Also: I just encountered an error flag dealing with exactly that error message when the Update Manager attempted to start. It says "E: Malformed line 54 in source list /etc/apt/sources.list (dist parse), E: the list of sources could not be read." The little warning in the corner includes the message "This usually means that your installed packages have unmet dependencies."

Does this add anything useful? If my update manager is jamming as well, then I'd like to get this straightened out. Because, don't I need the update manager?

Revision history for this message
E. Mark Mitchell (bbanzai123) said :
#6

Seriously, if there's an extra slash in there that's not supposed to be, I want to take it out. But I have no idea what to enter to do that, to correct the issue. I don't even really know how it got in there. I just need a step-by-step to get things rolling again.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

If you run:
gksudo gedit /etc/apt/sources.list

You will get write access

Revision history for this message
E. Mark Mitchell (bbanzai123) said :
#8

Okay, that works. I apparently have write access, whatever that means.

Now what?

Revision history for this message
Ted C (tedc) said :
#9

Using the file that is open now (with write permission ie you can amend it) you replace the following line -

deb http://archive.canonical.com/lucid partner

with this line -

deb http://archive.canonical.com lucid partner

Then you carefully save (file menu) the open file and close it.

After that the 'malformed' line error should not occur.

You can check this by doing -

head -n 54 /etc/apt/sources.list | tail -n 1

again.

Revision history for this message
E. Mark Mitchell (bbanzai123) said :
#10

Hooray! Thank you, Ted C. That's exactly what I needed.

Thanks everyone! Successful fix!

Now I just have to figure out how to do what I was originally trying to do without running into this same trouble!

You, ah, might be seeing my name again on a different problem thread. :)