从DockerHub
上pull
了一个ubuntu:14.04
的镜像:
但是进入到容器中执行apt update
的时候提示Hash Sum mismatch
错误详情
Ign http://archive.ubuntu.com trusty InRelease Hit http://archive.ubuntu.com trusty-updates InRelease Hit http://archive.ubuntu.com trusty-security InRelease Hit http://archive.ubuntu.com trusty Release.gpg Get:1 http://archive.ubuntu.com trusty-updates/main Sources [1175 kB] Get:2 http://archive.ubuntu.com trusty-updates/restricted Sources [1175 kB] Get:3 http://archive.ubuntu.com trusty-updates/universe Sources [1175 kB] Get:4 http://archive.ubuntu.com trusty-updates/main amd64 Packages [23.5 kB] Get:5 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [23.5 kB] Get:6 http://archive.ubuntu.com trusty-security/main Sources [1175 kB] Get:7 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [23.5 kB] Get:8 http://archive.ubuntu.com trusty-security/restricted Sources [1175 kB] Get:9 http://archive.ubuntu.com trusty-security/universe Sources [1175 kB] Get:10 http://archive.ubuntu.com trusty-security/main amd64 Packages [23.5 kB] Get:11 http://archive.ubuntu.com trusty-security/restricted amd64 Packages [20.2 kB] Get:12 http://archive.ubuntu.com trusty-security/universe amd64 Packages [23.5 kB] Hit http://archive.ubuntu.com trusty Release Get:13 http://archive.ubuntu.com trusty/main Sources [1175 kB] Get:14 http://archive.ubuntu.com trusty/restricted Sources [1175 kB] Get:15 http://archive.ubuntu.com trusty/universe Sources [1175 kB] Get:16 http://archive.ubuntu.com trusty/main amd64 Packages [16.4 kB] Get:17 http://archive.ubuntu.com trusty/universe amd64 Packages [7589 kB] Get:18 http://archive.ubuntu.com trusty/restricted amd64 Packages [16.0 kB] Fetched 10.7 MB in 3min 28s (51.4 kB/s) W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/source/Sources Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/restricted/source/Sources Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/source/Sources Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-amd64/Packages Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/main/source/Sources Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/restricted/source/Sources Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/universe/source/Sources Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/main/binary-amd64/Packages Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/universe/binary-amd64/Packages Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/main/source/Sources Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/restricted/source/Sources Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/universe/source/Sources Hash Sum mismatch W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/main/binary-amd64/Packages Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead.
到网上找了一些资料:
四种方法都试了,但是都没效果。
#1. 第一种方法 sudo apt-get clean sudo apt-get update --fix-missing #2. 第二种方法 # 删除 sudo rm -fR /var/lib/apt/lists/* # 新建相应文件夹 sudo mkdir /var/lib/apt/lists/partial # 重新update sudo apt-get update #3. 第三种方法 换源,阿里,CentOS,163的都试过 #4. 第四种方法 把http换成https但是也不行,提示apt-transport-https包没安装...但是没修复源的问题,也装不了... E: The method driver /usr/lib/apt/methods/https could not be found. N: Is the package apt-transport-https installed? E: The method driver /usr/lib/apt/methods/https could not be found. N: Is the package apt-transport-https installed?
不知道大家有没有碰到过这个问题,期待大家的解答,谢谢大家。
感觉可能是网络的原因,但是依法上网老是断,不好使。找不到比较可靠的依法上网...
付费偷看金额在0.1-10元之间
貌似还是和镜像源相关,改成国内的,然后重启重新试一下。
一周热门 更多>