Problem to add a repository for Docker - Ubuntu 18.04

I’m trying a Docker installation on Ubuntu 18.04.3 LTS bionic (VirtualBox 6.0.14), running the command below accordind the official Docker docs:

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

I’m receiving a message showing something wrong, below the results from a file redirecting the command above:

Hit:1 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:2 http://br.archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://br.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://br.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:5 http://br.archive.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists...
W: Skipping acquire of configured file 'stabe/binary-amd64/Packages' as repository 'https://download.docker.com/linux/ubuntu bionic InRelease' doesn't have the component 'stabe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stabe/i18n/Translation-en_US' as repository 'https://download.docker.com/linux/ubuntu bionic InRelease' doesn't have the component 'stabe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stabe/i18n/Translation-en' as repository 'https://download.docker.com/linux/ubuntu bionic InRelease' doesn't have the component 'stabe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stabe/cnf/Commands-amd64' as repository 'https://download.docker.com/linux/ubuntu bionic InRelease' doesn't have the component 'stabe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stabile/binary-amd64/Packages' as repository 'https://download.docker.com/linux/ubuntu bionic InRelease' doesn't have the component 'stabile' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stabile/i18n/Translation-en' as repository 'https://download.docker.com/linux/ubuntu bionic InRelease' doesn't have the component 'stabile' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stabile/i18n/Translation-en_US' as repository 'https://download.docker.com/linux/ubuntu bionic InRelease' doesn't have the component 'stabile' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stabile/cnf/Commands-amd64' as repository 'https://download.docker.com/linux/ubuntu bionic InRelease' doesn't have the component 'stabile' (component misspelt in sources.list?)

The messages are mentioning a component ‘stabe’ or ‘stabile’ what I understanding would be ‘stable’. Appreciate if someone can suggest whats happening. Thanks.

1 Like

Apparently I was able to solve it after a lot of research thanks to a comment lost on a website. Here’s what I did to solve:

1- Edit the file /etc/apt/sources.list - in the line with the reference to Docker, at the end, appeared the strange terms that I mentioned in the error msg, see the screen below, I selected the line in yellow:

2- Edit the line removing the options and leaving only ‘stable’;

3- Execute the commands below:

$ sudo apt-get update

$ sudo apt-get install docker-ce

4- Messages indicated that the installation was already attempted but could be defective and should be fixed by the command:

$ sudo apt --fix-broken install

5- Test Docker with the command below and finally it looks like the installation is OK:

$ docker run hello-world

I confess that many attempts lose the sequence as events occurred, the fact is that apparently the problem was in the sources.list file, as he entered those incorrect terms I don’t know.

1 Like

thanks man, just run into this problem right now!