记一次Ubuntu19无法安装docker源
按照各大网站以及个人习惯我会使用下面这种方法添加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源的更多相关文章
- kali安装开启ssh & 安装docker
ssh相关 一.配置SSH参数 . 修改sshd_config文件,命令为: vi /etc/ssh/sshd_config 将#PasswordAuthentication no的注释去掉,并且将N ...
- CentOS7用阿里云Docker Yum源在线安装Docker 17.03.2
参考文档 安装步骤 删除已安装的Docker 配置阿里云Docker Yum源 安装指定版本 启动Docker服务 参考文档 官方Docker安装文档:https://docs.docker. ...
- 配置docker官方源并用yum安装docker
一.docker的官方安装文档: https://docs.docker.com/engine/installation/linux/centos/ 由docker给的文档可以看出它也只是去配置了一个 ...
- CentOS7用阿里云Docker Yum源在线安装Docker
一.参考文档 官方Docker安装文档:https://docs.docker.com/install/linux/docker-ce/centos 阿里云Docker安装文档:https://yq. ...
- Linux中修改docker镜像源及安装docker
1.首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.re ...
- centos7 安装docker(手动和脚本安装)换源 卸载
centos7 安装docker(手动和脚本安装)换源 卸载 Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker ...
- [Linux] - Manjaro ARM 系统配置(更新镜像源,安装 Docker 和 Dotnet Core)
硬件:Raspberry Pi 4B系统:Manjaro-ARM-xfce-rpi4-19.08网址:https://manjaro.org/ Issue系统启动后,中文字符显示为小方格乱码 解决:安 ...
- 【从零开始搭建K8S】【第一篇】CentOS7.6离线安装Docker(手动安装以及基于yum本地源安装)
下载CentOS7.6以及最小化安装CentOS7.6版本.由于CentOS属于开源软件,在国内也有很多的mirror站点可供下载,我选择的是华为站点进行下载:http://mirrors.huawe ...
- CentOS7使用阿里云源安装Docker
安装步骤 1.删除已安装的Docker # Uninstall installed docker sudo yum remove docker \ docker-client \ docker-cli ...
随机推荐
- Python面向对象-多重继承之MixIN
以Animal类为例,假设要实现以下4种动物: Dog(狗).Bat(蝙蝠).Parrot(鹦鹉)和Ostrich(鸵鸟) 如果按照哺乳类和鸟类来区分的话,可以这样设计: Animal: |--Mam ...
- django 用户与权限管理
django中使用content_type表进行存储app与model的关系.在permission表中设立了name(权限的名字,中英文均可)content_type_id(与content_typ ...
- 通过 loganalyzer 展示数据库中的系统日志
目录 通过 loganalyzer 展示数据库中的日志 环境准备 准备服务器: 日志服务器: 数据库服务器: 测试日志服务器和数据库是否连接: websrv服务器端: 通过 loganalyzer 展 ...
- 2018 经典的CVPR 关于ImageCaptioning论文
1. SemStyle: Learning to Generate Stylised Image Captions using Unaligned Text(2018 CVPR) 主要研 ...
- 查看python版本多少位的
正常我们在cmd终端输入python之后,如果有安装python,就会在回车之后出来关于你安装的python版本信息,几版本,多少位的,但是还有一种,像我这样只显示了python版本是3.7.5,并没 ...
- opencv检测图像直线
#include<opencv2/opencv.hpp> #include<iostream> using namespace std; using namespace cv; ...
- [Codeforces 1244C] The Football Season
思维加枚举 题意 :足球赛,赢平所得到的分数分别为w和d,w>d,分别求赢平输的场数,输出一组即可,即x+y+z=n 且 xw+yd=p的一组解. 可以扩展公约数做,但由于注意到d和w<1 ...
- Jmeter中使用HTTP信息头管理器发送json格式请求体的接口
Jmeter中,如果请求体的格式为x-www-form-urlencoded,则不需要添加请求头,保持默认即可,但是如果遇到接口的请求体格式为json时,就要用到HTTP信息头管理器,在线程组上右键— ...
- win10搭建Python3环境
到2019年初,Python3已经更新到了Python3.7.3,Python有两个大版本Python2和Python3,Python3是现在和未来的主流. 本文介绍Python3.7 ...
- Git实战指南----跟着haibiscuit学Git(第七篇)
笔名: haibiscuit 博客园: https://www.cnblogs.com/haibiscuit/ Git地址: https://github.com/haibiscuit?tab=re ...