请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

apt-get update失败 Failed to fetch

麻烦老师解答一下,配置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.

正在回答 回答被采纳积分+3

2回答

每天是周末 2020-03-09 17:33:13

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

0 回复 有任何疑惑可以回复我~
神思者 2018-11-12 14:57:48

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

0 回复 有任何疑惑可以回复我~
  • 提问者 元气满满来学习 #1
    老师,我改了DNS之后apt-get update问题还是在的。
    E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
    报错的原因是容器内部没有授权外网。。。我应该怎么给它授权外网呢?
    回复 有任何疑惑可以回复我~ 2018-11-13 15:01:10
  • 神思者 回复 提问者 元气满满来学习 #2
    apt-get速度慢,不用修改dns,你把dns改回去,然后修改apt-get源就行了,找个阿里的源或者163的源,替换source.list文件就可以了
    回复 有任何疑惑可以回复我~ 2018-11-13 15:36:10
  • 提问者 元气满满来学习 回复 神思者 #3
    问题解决啦,谢谢老师
    回复 有任何疑惑可以回复我~ 2018-11-13 19:45:08
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信