0

I'm seeing the following errors in my terminal:

E: Malformed line 1 in source list /etc/apt/sources.list.d/docker.list (type)
E: The list of sources could not be read.

I've already tried editing my sources.list file, but the error is still the same.

1 Answers1

2

In addition to the central /etc/apt/sources.list, there's a directory that can contain individual files with sources. This directory is /etc/apt/sources.list.d/. This type of setup, a central config file plus a directory with individual, smaller files, is quite common.

In your case, the malformed line isn't in the central sources.list, but in one of the files in sources.list.d, namely in docker.list:

E: Malformed line 1 in source list /etc/apt/sources.list.d/docker.list (type)
E: The list of sources could not be read.

As a more general remark, it's often a good idea to read the error messages completely. In many cases they spell out where the problem is quite literally.