linux - dockerhub pull下来的Ubuntu:14.04镜像,apt update提示Hash Sum mismatch?

 jeson1232 发布于 2022-10-31 09:14

DockerHubpull了一个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?

不知道大家有没有碰到过这个问题,期待大家的解答,谢谢大家。

感觉可能是网络的原因,但是VPN老是断,不好使。找不到比较可靠的VPN...

1 个回答
  • 貌似还是和镜像源相关,改成国内的,然后重启重新试一下。

    2022-10-31 22:48 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有