按照各大网站以及个人习惯我会使用下面这种方法添加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. Jenkins + Docker + dockerfile-maven-plugin + Harbor CI/CD spring-boot项目的最轻量级配置

    说明 本文只为方便日后查阅,记录一些关键性的步骤和踩坑的情况. dockerfile-maven-plugin构建镜像配置 <plugin> <groupId>com.spot ...

  2. Maven使用教程三:maven的生命周期及插件机制详解

    前言 今天这个算是学习Maven的一个收尾文章,里面内容不局限于标题中提到的,后面还加上了公司实际使用的根据profile配置项目环境以及公司现在用的archetype 模板等例子. 后面还会总结一个 ...

  3. Nginx-HTTP Strict Transport Security(HSTS)

    HTTP Strict Transport Security(HSTS) HTTP Strict Transport Security(通常简称为HSTS)是一个安全功能,它告诉浏览器只能通过HTTP ...

  4. 分布式全文搜索引擎ElasticSearch—超详细

    1 ElasticSearch 1.1 ES的概念和特点 ES:全文检索的框架,专门做搜索,支持分布式.集群.封装的Lucene. 特点: 原生的Lucene使用的不足,优化了Lucene的调用方式 ...

  5. 开源资产管理系统Snipe-IT

    CentOS7安装IT资产管理系统Snipe-IT介绍资产管理工具Github:https://github.com/snipe/snipe-it官网:https://snipeitapp.com/D ...

  6. sql server的简单分页

    --显示前条数据 select top(4) * from students; --pageSize:每页显示的条数 --pageNow:当前页 )) sno from students); --带条 ...

  7. 我如何通过K8S开发认证(CKAD)考试

    题记:笔者最近经过3个多月的空余时间准备,终于通过了K8S开发认证(CKAD)的考试,在这里简单给大家分享一下经验. 一,先科普下CKAD 众所周知,Kubernetes在容器编排器大战中脱颖而出后, ...

  8. Appium(十):元素定位(加强版)

    1. 元素定位 写完上一篇元素定位的博客,发现实用性基本为零.这几天真的烦死我了,一直在找资料,还去看了一遍appium官网文档.最后结合着selenium的定位方法,测试出几种可行的元素定位方法. ...

  9. Hive concat函数连接后结果为null

    Hive concat函数连接后结果为null concat函数是用来连接字符串的 使用示例: select concat('Hello','World','Java'); 运行结果: 最近我们在做需 ...

  10. IT兄弟连 HTML5教程 CSS3属性特效 文字描边

    用CSS3实现的文字描边效果,一个CSS3文字特效实例,字体可以自己随意改,字体颜色也可以自己改.IE9以下浏览器无效果,所以提醒大家测试时候要使用Google Chrome.-webkit-text ...