When I try to enable the application in the gcp virtual machine (Ubuntu 20.04 lts), I get the error below:
E: Malformed entry 1 in list file /etc/apt/sources.list.d/docker.list (Suite) E: The list of sources could not be read.
The error appears only after typing the following commands:
sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg \ lsb-release curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker- archive-keyring.gpg echo \ "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/ linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
After typing the above commands, when I try to go through the next step (
sudo apt-get update) I get this error.
I think some lines are broken in my sources.list.
Tried to walk through
sudoedit /etc/apt/sources.list.d/docker.list and find broken lines.
The above file looks like this:
deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/ linux/ubuntu focal stable
What's wrong with this file? I can't solve it.