apt-get update失败 Failed to fetch

来源:4-5 负载均衡的高可用方案(下)

元气满满来学习

2018-11-12

麻烦老师解答一下,配置haproxy h2是出现如题问题。
尝试了 修改DNS,/etc/resolv.conf(我改的是docker外部的文件,haproxy中的文件还改不了,因为update没成功,也就不能下载vim)
尝试了rm -rf /var/lib/apt/lists/*

还是没成功update

在我尝试改之前,报错
root@eeaa2014c1d5:/# apt-get update
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [2281 B]
Err:1 http://security.debian.org/debian-security stretch/updates InRelease
Clearsigned file isn’t valid, got ‘NOSPLIT’ (does the network require authentication?)
Get:2 http://deb.debian.org/debian stretch InRelease [2281 B]
Err:2 http://deb.debian.org/debian stretch InRelease
Clearsigned file isn’t valid, got ‘NOSPLIT’ (does the network require authentication?)
Get:3 http://deb.debian.org/debian stretch-updates InRelease [2281 B]
Err:3 http://deb.debian.org/debian stretch-updates InRelease
Clearsigned file isn’t valid, got ‘NOSPLIT’ (does the network require authentication?)
Fetched 6843 B in 0s (12.4 kB/s)
Reading package lists… Done
E: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease Clearsigned file isn’t valid, got ‘NOSPLIT’ (does the network require authentication?)
E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease Clearsigned file isn’t valid, got ‘NOSPLIT’ (does the network require authentication?)
E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease Clearsigned file isn’t valid, got ‘NOSPLIT’ (does the network require authentication?)
E: Some index files failed to download. They have been ignored, or old ones used instead.

改之后报错如下:
root@eeaa2014c1d5:/# apt-get update
Err:1 http://deb.debian.org/debian stretch InRelease
Temporary failure resolving 'deb.debian.org
Err:2 http://security.debian.org/debian-security stretch/updates InRelease
Temporary failure resolving 'security.debian.org
Err:3 http://deb.debian.org/debian stretch-updates InRelease
Temporary failure resolving 'deb.debian.org
Reading package lists… Done
W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease Temporary failure resolving 'deb.debian.org
W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease Temporary failure resolving 'security.debian.org
W: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease Temporary failure resolving 'deb.debian.org
W: Some index files failed to download. They have been ignored, or old ones used instead.

写回答

2回答

每天是周末

2020-03-09

您好,您的这个问题,最后是怎么解决的?

0
0

神思者

2018-11-12

你可以把haproxy的容器的配置文件映射到宿主机上面,在宿主机上面用vim修改不就行了么?

0
4
weixin_慕神1333520
回复
元气满满来学习
请问你是怎么替换source.list?
2020-02-19
共4条回复

Docker环境下的企业级前后端分离项目部署与运维

手把手带你学会项目分布式集群部署,让你的系统不再惧怕宕机

2459 学习 · 1018 问题

查看课程