Share the problem of Ubuntu 19 not being able to install docker source

Share the problem of Ubuntu 19 not being able to install docker source

According to major websites and personal habits, I will use the following method to add Docker sources:

root@ubuntu:~# sudo add-apt-repository "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

However, using the above command brought me endless troubles, and I even doubted whether I was a qualified Linux engineer. Using this command prompted the following error:

Ign:1 https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu eoan InRelease

Err:2 https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu eoan Release
404 Not Found [IP: 218.104.71.170 443]
Hit:3 http://cn.archive.ubuntu.com/ubuntu eoan InRelease
Hit:4 http://cn.archive.ubuntu.com/ubuntu eoan-updates InRelease
Hit:5 http://cn.archive.ubuntu.com/ubuntu eoan-backports InRelease
Hit:6 http://cn.archive.ubuntu.com/ubuntu eoan-security InRelease
Reading package lists... Done 
E: The repository 'https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu eoan Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

The following is the content of the apt source file:

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

It is found that there are no errors, but you will find that various errors will appear when using apt update. In the end, there is still no docker-ce installation package you want, and it still cannot be installed:

root@uduntu:~# apt-get update
Get:1 http://cn.archive.ubuntu.com/ubuntu eoan InRelease [255 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu eoan-updates InRelease [88.4 kB]
Hit:3 http://cn.archive.ubuntu.com/ubuntu eoan-backports InRelease
Get:4 http://cn.archive.ubuntu.com/ubuntu eoan-security InRelease [92.9 kB]
Ign:5 https://download.docker.com/linux/ubuntu eoan InRelease                            
Err:6 https://download.docker.com/linux/ubuntu eoan Release                            
 404 Not Found [IP: 13.225.103.32 443]
Reading package lists... Done                                    
E: The repository 'https://download.docker.com/linux/ubuntu eoan Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@uduntu:~# apt search docker-ce
root@uduntu:~#

I also feel very troubled when encountering this kind of problem. I have found many solutions on the Internet but none of them work. Some people say that it is a network problem and they cannot use the source code library on the external network. I was confused when I saw this article. I also tried to install the sources of NetEase, Alibaba and USTC, but it did not solve the problem better. In fact, this is very simple. Just look at how the source code libraries of Alibaba, USTC and NetEase are written into the configuration files, and then copy them.

Solution:

Just add the following to sources.list:

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

Update apt sources:

root@uduntu:~# apt-get update
Get:1 http://cn.archive.ubuntu.com/ubuntu eoan InRelease [255 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu eoan-updates InRelease [88.4 kB]
Hit:3 http://cn.archive.ubuntu.com/ubuntu eoan-backports InRelease
Get:4 http://cn.archive.ubuntu.com/ubuntu eoan-security InRelease [92.9 kB]
Get:5 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB] 
Get:6 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [9,594 B] Fetched 511 kB in 11s (48.3 kB/s) 
Reading package lists... Done
root@uduntu:~#

That's it. No error is reported. Let's see if the docker-ce installation package is available:

root@uduntu:~# apt search docker-ce
Sorting... Done
Full Text Search... Done
docker-ce/bionic,now 5:19.03.4~3-0~ubuntu-bionic amd64 [installed]
 Docker: the open-source application container engine

docker-ce-cli/bionic,now 5:19.03.4~3-0~ubuntu-bionic amd64 [installed,automatically]
 Docker CLI: the open-source application container engine

root@uduntu:~

Summarize

The above is what I introduced to you about the problem that Ubuntu 19 cannot install the docker source. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Use of environment variables in Docker and solutions to common problems
  • Docker solves the problem that the terminal cannot input Chinese
  • Docker exposes port 2375, causing server attacks and solutions
  • Install Jenkins with Docker and solve the problem of initial plugin installation failure
  • Solve the problem that the docker container cannot ping the external network
  • When setting up Jenkins in Docker environment, the console log shows garbled Chinese characters when building tasks
  • Solution to the problem that docker logs cannot be retrieved
  • Docker FAQ

<<:  A brief discussion on the lazy loading attribute pattern in JavaScript

>>:  A brief discussion on the maximum number of open files for MySQL system users

Recommend

How to implement checkbox & radio alignment

Not only do different browsers behave differently...

MySQL 8.0.13 installation and configuration tutorial under CentOS7.3

1. Basic Environment 1. Operating system: CentOS ...

TypeScript union types, intersection types and type guards

Table of contents 1. Union Type 2. Crossover Type...

MySQL complete collapse query regular matching detailed explanation

Overview In the previous chapter, we learned abou...

Sample code for html list box, text field, and file field

Drop-down box, text field, file field The upper p...

Vue3+TypeScript encapsulates axios and implements request calls

No way, no way, it turns out that there are peopl...

Use js to call js functions in iframe pages

Recently, I have been working on thesis proposals ...

MYSQL's 10 classic optimization cases and scenarios

Table of contents 1. General steps for SQL optimi...

Detailed tutorial on installing MySQL offline on CentOS7

1. Delete the original mariadb, otherwise mysql c...

Method example of safely getting deep objects of Object in Js

Table of contents Preface text parameter example ...

JavaScript to achieve fireworks effects (object-oriented)

This article shares the specific code for JavaScr...

Example of using CSS3 to achieve shiny font effect when unlocking an Apple phone

0. Introduction August 18, 2016 Today, I noticed ...