香港代理服务器的Ubuntu无法安装docker源问题
在香港代理服务器使用ubuntu系统的时候发现无法安装docker,然后再网络上找了好多教程,结果反馈回来的都不行。
后来这边总结到问题所在。以下是利联科技为您带来的ubuntu系统无法安装docker的问题
root@ubuntu:~#sudoadd-apt-repository"deb[arch=amd64]
https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
然而在使用上面这条命令给我带来了无尽的烦恼,使用了这条命令提示以下错误:
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: 61.133.6.208 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-s
ecure(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
当时发现香港代理服务器的ubuntu系统内是没有任何错误的,但是你会发现在使用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-ce
遇到这种问题我也觉得很头疼,在网上找了很多解决方法都是不行,有人都说是网络问题无法使用外网的源码库,我还试
过安装网易、阿里云以及科大的源都不能更好的解决问题,其实这个很简单看一下阿里云、科大和网易的他们的源码库是
怎么往配置文件里面写的,然后按照其方式来做
解决方法:
在sources.list添加下面这一条就可以:
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
更新apt源:
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 1
1s (48.3 kB/s) Reading package lists...
Done root@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:~
这样就可以完美解决了问题所在啦,以上是为您带来的香港代理服务器ubuntu系统无法安装docker的问题解决办法。