按照各大网站以及个人习惯我会使用下面这种方法添加Docker源:

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

然而使用上面这条命令给我带来了无尽的烦恼,甚至我都怀疑我是不是一个合格的linux工程师了,使用了这条命令提示以下错误:

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.

下面是apt源文件中的内容:

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

发现是没有任何错误的,但是你会发现在使用apt更新时会出现各种各样报错,最终还是没有你想要的docker-ce安装包,还是无法安装:

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-ceroot@uduntu:~#

遇到这种问题我也觉得很头疼,在网上找了很多解决方法都是不行,有人都说是网络问题无法使用外网的源码库,我看到这个文章我都懵了,我还试过安装网易、阿里以及科大的源都不能更好的解决问题,其实这个很简单看一下阿里、科大和网易的他们的源码库是怎么往配置文件里面写的,然后比葫芦画瓢画一个不就完了

解决方法:

在sources.list添加下面这一条就可以:

deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable//然后下载安装相关密钥curl -fsSL http://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

更新apt源:

root@uduntu:~# apt-get  updateGet: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 InReleaseGet: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... Doneroot@uduntu:~#

这样就好了,不报错了,再看看docker-ce这个安装包有没有:

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,automatic]
  Docker CLI: the open-source application container engine

root@uduntu:~# 

OK这就搞定了!

好啦这次就到这里了,我继续更新我的大脑啦!!!

记一次Ubuntu19无法安装docker源的更多相关文章

  1. kali安装开启ssh & 安装docker

    ssh相关 一.配置SSH参数 . 修改sshd_config文件,命令为: vi /etc/ssh/sshd_config 将#PasswordAuthentication no的注释去掉,并且将N ...

  2. CentOS7用阿里云Docker Yum源在线安装Docker 17.03.2

        参考文档 安装步骤 删除已安装的Docker 配置阿里云Docker Yum源 安装指定版本 启动Docker服务 参考文档 官方Docker安装文档:https://docs.docker. ...

  3. 配置docker官方源并用yum安装docker

    一.docker的官方安装文档: https://docs.docker.com/engine/installation/linux/centos/ 由docker给的文档可以看出它也只是去配置了一个 ...

  4. CentOS7用阿里云Docker Yum源在线安装Docker

    一.参考文档 官方Docker安装文档:https://docs.docker.com/install/linux/docker-ce/centos 阿里云Docker安装文档:https://yq. ...

  5. Linux中修改docker镜像源及安装docker

    1.首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.re ...

  6. centos7 安装docker(手动和脚本安装)换源 卸载

    centos7 安装docker(手动和脚本安装)换源 卸载 Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker ...

  7. [Linux] - Manjaro ARM 系统配置(更新镜像源,安装 Docker 和 Dotnet Core)

    硬件:Raspberry Pi 4B系统:Manjaro-ARM-xfce-rpi4-19.08网址:https://manjaro.org/ Issue系统启动后,中文字符显示为小方格乱码 解决:安 ...

  8. 【从零开始搭建K8S】【第一篇】CentOS7.6离线安装Docker(手动安装以及基于yum本地源安装)

    下载CentOS7.6以及最小化安装CentOS7.6版本.由于CentOS属于开源软件,在国内也有很多的mirror站点可供下载,我选择的是华为站点进行下载:http://mirrors.huawe ...

  9. CentOS7使用阿里云源安装Docker

    安装步骤 1.删除已安装的Docker # Uninstall installed docker sudo yum remove docker \ docker-client \ docker-cli ...

随机推荐

  1. OurEDA慕课网开发记录

    项目说明 OurEDA实验室每年都会面向大一新生招人,每周的沙龙都会有学长来讲课,传经验,录下来的沙龙视频就非常有价值,因此,在老师的安排下,我负责开发了慕课网这样一个项目. 首要问题及其解决方案 视 ...

  2. 【后端C#】后台通过http post 调用 webservice 的方法

    定义http post 调用webservice的某个方法 /// <summary> /// http Post调用 WebService /// </summary> pu ...

  3. C语言笔记 07_枚举&指针

    emum(枚举) 枚举是 C 语言中的一种基本数据类型,它可以让数据更简洁,更易读. 枚举语法定义格式为: enum 枚举名 {枚举元素1,枚举元素2,--}; 举个例子,比如:一星期有 7 天,如果 ...

  4. 由于ie浏览器ajax缓存 导致layui table表格重载失败的解决办法

    where: { time:new Date()//增加一个数据接口的额外参数→时间戳 }

  5. Android设置EditText不可编辑

    版权声明:本文为xing_star原创文章,转载请注明出处! 本文同步自http://javaexception.com/archives/224 禁用EditText 这个其实很简单,最简单的一种方 ...

  6. Android 上下文菜单 ContextMenu

    public class MainActivity extends Activity { private ListView listView; @Override protected void onC ...

  7. dataguard ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

    错误的意思是listener 不知道连接解析器中的请求服务,这里要说静态监听和动态监听了动态注册是在instance启动的时候PMON进程根据init.ora中的instance_name,servi ...

  8. QT获取linux下的当前用户名

    故事背景:客户端启动的时候需要加载机器/home/xx/test.jpg的图片作为背景图,但是有的机器用户名叫AAA,有的机器名叫BBB,所以我需要获取当前用户的home目录 技术调研:QStanda ...

  9. MySql数据库基础之数据库简介及安装

    MySql数据库简介: 众所周知,MySql数据库是一款开源的关系型数据库,在Web应用方面,MySql是最好的.最流行的RDBMS(Relational Database Management Sy ...

  10. 使用Mybatis实现动态SQL(二)

    使用Mybatis实现动态SQL 作者 : Stanley 罗昊 [转载请注明出处和署名,谢谢!] 写在前面:        *本章节适合有Mybatis基础者观看* 使用Mybatis实现动态SQL ...