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

Analysis of several reasons why Iframe should be used less

The following graph shows how time-consuming it is...

VMware Tools installation and configuration tutorial for Ubuntu

Some time ago, the blogger installed the Ubuntu s...

HTML tutorial, easy to learn HTML language

1. <body background=image file name bgcolor=co...

HTML table markup tutorial (22): row border color attribute BORDERCOLORLIGHT

Within rows, light border colors can be defined i...

Make a nice flip login and registration interface based on html+css

Make a nice flip login and registration interface...

A brief discussion on how to use slots in Vue

How to define and use: Use the slot tag definitio...

Example operation MySQL short link

How to set up a MySQL short link 1. Check the mys...

MySQL 5.7.18 winx64 installation and configuration method graphic tutorial

The installation of compressed packages has chang...

Analyzing the four transaction isolation levels in MySQL through examples

Preface In database operations, in order to effec...

Analysis of MySQL latency issues and data flushing strategy process

Table of contents 1. MySQL replication process 2....

HTML table markup tutorial (18): table header

<br />The header refers to the first row of ...

Design Theory: Ten Tips for Content Presentation

<br /> Focusing on the three aspects of text...

Comparison of various ways to measure the performance of JavaScript functions

Table of contents Overview Performance.now Consol...

Linux Cron scheduled execution of PHP code with parameters

1. Still use PHP script to execute. Command line ...