Docker Debian apt从服务器读取错误 [英] Docker Debian apt Error Reading from Server
问题描述
似乎apt-get有与存储库服务器连接的问题。我想这可能是兼容性问题,如此处所述,然而,提出的解决方案 apt-get clean
对我来说不起作用。另外我很惊讶,如果是这样,那么没有更多的人有我的问题。
It would seem that apt-get is having issues connecting with the repository servers. I suppose it is likely compatibility issues, as mentioned here, however the proposed solution of apt-get clean
does not work for me. Also I am surprised, if this is the case, that there are not more people having my issue.
Dockerfile
Dockerfile
FROM debian:jessie
RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends \
git
$ docker build .
docker build .
Sending build context to Docker daemon 2.048 kB
Step 0 : FROM debian:jessie
---> 4a5e6db8c069
Step 1 : RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends git
---> Running in 43b93e93feab
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
... some omitted ...
Get:6 http://httpredir.debian.org jessie-updates/main amd64 Packages [3614 B]
Fetched 9552 kB in 7s (1346 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
... some omitted ...
0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.2 MB of archives.
After this operation, 64.0 MB of additional disk space will be used.
Get:1 http://security.debian.org/ jessie/updates/main libgnutls-deb0-28 amd64 3.3.8-6+deb8u2 [694 kB]
... some omitted ...
Get:5 http://httpredir.debian.org/debian/ jessie/main libnettle4 amd64 2.7.1-5 [176 kB]
Err http://httpredir.debian.org/debian/ jessie/main libffi6 amd64 3.1-2+b2
Error reading from server. Remote end closed connection [IP: 176.9.184.93 80]
... some omitted ...
Get:25 http://httpredir.debian.org/debian/ jessie/main git amd64 1:2.1.4-2.1 [3624 kB]
Fetched 13.2 MB in 10s (1307 kB/s)
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/libf/libffi/libffi6_3.1-2+b2_amd64.deb Error reading from server. Remote end closed connection [IP: 176.9.184.93 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get clean && apt-get update && apt-get install -y --no-install-recommends git' returned a non-zero code: 100
<请注意,我还发布了一个不同的问题的此处。我相信它是无关紧要的,但实际上可能是这样。
Please note that I also posted here with a different issue. I believe it to be unrelated, but it may well actually be.
推荐答案
httpredir.debian.org 镜像是魔术,它将负载平衡和地理IP您透明地提高性能和可用性。我会立即怀疑这是导致你的问题,或至少是排除第一件事。
The httpredir.debian.org mirror is "magic" in that it will load-balance and geo-ip you to transparent increase performance and availability. I would therefore immediately suspect it of causing your problem, or at least be the first thing to rule out.
我会检查你是否可以:
-
仍然重现问题;
httpredir.debian.org
将从其内部列表中抛出不好的镜像,所以您的问题可能是暂时的。
Still reproduce the problem;
httpredir.debian.org
will throw out "bad" mirrors from its internal lists so your issue may have been temporary.
使用不同的 httpredir.debian.org
镜像重现问题。尝试像 ftp.de.debian.org
。如果它与这个镜子一起工作,请联系 httpredir.debian.org
维护者,并向他们报告问题。他们相当敏感,可以接收错误报告。
Reproduce the problem with a different, non-httpredir.debian.org
mirror. Try something like ftp.de.debian.org
. If it then works with this mirror, do please contact the httpredir.debian.org
maintainer and report the issue to them. They are quite responsive and open to bug reports.
这篇关于Docker Debian apt从服务器读取错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!