19

Just got a fresh Linux mint 19.2 installed, i needed docker so i went to the docker doc and followed the process.

https://docs.docker.com/install/linux/docker-ce/ubuntu/

everything went well until step 4 of the repository set up.

on the 4 step it says "Malformed input, repository not added."

I've changed "$(lsb_release -cs)" to "tina" and "tara" still doesn't work.

the 4th step to set up the repository:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Xen Siva
  • 203
  • 2
  • 7
  • 1
    Linux questions must be programming related. Please visit https://unix.stackexchange.com . – peterh Jan 01 '20 at 00:18
  • fixed on mint 19 by adding next commands: sudo add-apt-repository "deb https://download.docker.com/linux/ubuntu bionic stable" sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io and all works fine! – Vaha Feb 07 '20 at 08:09

2 Answers2

50
sudo nano /etc/apt/sources.list.d/additional-repositories.list

add the following line in the file

deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable

then,

sudo apt update

you know the rest of the steps. Good luck!

LeoZ
  • 635
  • 6
  • 5
  • After 1 hour of surfing i got my answer. Thank you very much – ashish pandey Oct 09 '19 at 16:52
  • 1
    Superb, I searched a lot, but this is the correct answer, thank you so much sir !!! edit: Adding `deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable` through either the "Update Manager" -> Edit -> "Software Sources" still yields the same error "Malformed input, repository not added.". Only the way described in this answer works. Something the mint developers might want to look into. – codestruggle Oct 28 '19 at 08:13
  • For the nano beginners, double press "Escape" and then "x" will exit nano, confirm saving with "y" and press "Enter". – questionto42 Dec 29 '20 at 09:56
5

Leo's answer is very widely accepted but for some reason his solution doesn't work in my machine which is run by Linux Mint 19.3 Chinamon. So after doing some research I came out with this solution.

First Run this

echo -e "\ndeb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" | sudo tee -a /etc/apt/sources.list

and then update the package index.

sudo apt-get update
Shubho Shaha
  • 1,869
  • 1
  • 16
  • 22