Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos Docker apt更新:某些索引文件下载失败。它们被忽略了,或者使用了旧的_Macos_Docker - Fatal编程技术网

Macos Docker apt更新:某些索引文件下载失败。它们被忽略了,或者使用了旧的

Macos Docker apt更新:某些索引文件下载失败。它们被忽略了,或者使用了旧的,macos,docker,Macos,Docker,环境: 主机操作系统:MacOSCatalina Docker版本:Docker版本19.03.8,构建afacb8b 问题: 从docker内部,我确保我可以ping 8.8.8.8并解析主机名。但是我不明白为什么我会看到*** 意外的大小错误 当我运行apt更新时 从bash终端,我运行以下命令: docker run -it ubuntu:18.04 bash root@83c668ee64d0:/# apt update Get:1 http://security.debian.org

环境:

主机操作系统:MacOSCatalina Docker版本:Docker版本19.03.8,构建afacb8b

问题:

从docker内部,我确保我可以ping 8.8.8.8并解析主机名。但是我不明白为什么我会看到***

意外的大小错误

当我运行apt更新时

从bash终端,我运行以下命令:

docker run -it ubuntu:18.04 bash

root@83c668ee64d0:/# apt update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://security.debian.org/debian-security buster/updates/main amd64 Packages [201 kB]
Get:3 http://deb.debian.org/debian buster InRelease [121 kB]
Get:4 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7905 kB]
Err:5 http://deb.debian.org/debian buster/main amd64 Packages
  File has unexpected size (13168 != 7905140). Mirror sync in progress? [IP: 151.101.96.204 80]
  Hashes of expected file:
   - Filesize:7905140 [weak]
   - SHA256:1b42c3159a573be2bea3b55e2f55f2236f6c0ca23beac23205d2688b892b3052
   - MD5Sum:9f4af9cc7e89f9ec9607738718505126 [weak]
  Release file created at: Sat, 09 May 2020 09:51:02 +0000
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7380 B]
Err:6 http://deb.debian.org/debian buster-updates/main amd64 Packages
  File has unexpected size (13184 != 7380). Mirror sync in progress? [IP: 151.101.96.204 80]
  Hashes of expected file:
   - Filesize:7380 [weak]
   - SHA256:6af9ea081b6a3da33cfaf76a81978517f65d38e45230089a5612e56f2b6b789d
  Release file created at: Wed, 03 Jun 2020 20:19:15 +0000
Fetched 438 kB in 3s (156 kB/s)
Reading package lists... Done
E: Failed to fetch http://deb.debian.org/debian/dists/buster/main/binary-amd64/by-hash/SHA256/1b42c3159a573be2bea3b55e2f55f2236f6c0ca23beac23205d2688b892b3052  File has unexpected size (13168 != 7905140). Mirror sync in progress? [IP: 151.101.96.204 80]
   Hashes of expected file:
    - Filesize:7905140 [weak]
    - SHA256:1b42c3159a573be2bea3b55e2f55f2236f6c0ca23beac23205d2688b892b3052
    - MD5Sum:9f4af9cc7e89f9ec9607738718505126 [weak]
   Release file created at: Sat, 09 May 2020 09:51:02 +0000
E: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/main/binary-amd64/by-hash/SHA256/6af9ea081b6a3da33cfaf76a81978517f65d38e45230089a5612e56f2b6b789d  File has unexpected size (13184 != 7380). Mirror sync in progress? [IP: 151.101.96.204 80]
   Hashes of expected file:
    - Filesize:7380 [weak]
    - SHA256:6af9ea081b6a3da33cfaf76a81978517f65d38e45230089a5612e56f2b6b789d
   Release file created at: Wed, 03 Jun 2020 20:19:15 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

From inside docker, I have ensured I can ping 8.8.8.8 and also resolve hostnames. But I dont understand why I am seeing unexpected size error
我做了以下工作:

curl http://deb.debian.org/debian/dists/buster/main/binary-amd64/by-hash/SHA256/1b42c3159a573be2bea3b55e2f55f2236f6c0ca23beac23205d2688b892b3052
发现

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <!--    Applications (such as Dictionary.app) can recognise that a
                webpage has been restricted by looking for the following comment:   -->

        <!-- com.apple.parentalcontrols.webcontentfilter.accessrestricted -->

        <title>Access Restricted</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <script type="text/javascript">

<!--

访问受限