Error installing docker. Please help

I've tried finding answers, but nothing I've found seems to work, or I'm unsure what I need to do. I've pulled it up in the text editor but am unsure what I need to correct. I'm worried about worsening my problem. I am newer and still learning, but I was trying to install docker and am now getting this error:

E: Malformed entry 1 in sources file /etc/apt/sources.list.d/docker.sources (Component)
E: The list of sources could not be read.

How can I fix or undo this?

If it is malformed, there is no valid reason to keep it.
Open an Root Elevated File manager

nautilus admin:///

Navigate to /etc/apt/sources.list.d/ - right click and delete docker.sources

You may want to visit Docker and get a corrected source file.

OMG THANK YOU!!! :grinning_face:

O dang... now its giving me:

E: Type 'sudo' is not known on line 4 in source list /etc/apt/sources.list
E: The list of sources could not be read.

I hate to ask... what do I do now?

Please relay the terminal output of:

cat /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu jammy-security main restricted universe multiverse EOL

sudo tee /etc/apt/sources.list > /dev/null <<EOL

deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse

The system won't let me enter the last line here as it is a link. but it goes:
deb http://archive.ubuntu. com/ubuntu jammy-security main restricted universe multiverse

This is the incorrect line.

nautilus admin:///

Navigate to /etc/apt/sources.list and Right Click it - then choose Open With > Text Editor

Highlight and Remove that line with the backspace key.
Save the file
Close it. Close the File Manager.
In terminal, run

sudo apt update

That line is not there by default, so either a script you ran or an errant terminal command. (Might be from that Docker addition)

When Posting terminal output: You can see an icon on the forum posting toolbar that looks like </>
That is the NoParse option that can wrap selected text like terminal output for the post.

AH! Okay. It looks like it may have worked. If I have another issue related to this, I'll reply back here. If you don't hear back from me, then Thank You VERY much. :smiley:

1 Like

FYI. I have amended the thread title to describe the issue concerned, extra to "Please help".

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.