!呜呼啦呼! 2022-03-18 14:26 采纳率: 85.7%
浏览 60
已结题

Docker建立镜像时,下载部分报错Hash Sum mismatch,如何解决?

利用dockerfile文件建立镜像时,下面这一步报错:

img


报错内容为:

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/main/p/python3-defaults/python3_3.5.1-3_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/main/m/mesa/libgbm1_18.0.5-0ubuntu0~16.04.1_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/main/libe/libedit/libedit2_3.1-20150325-1ubuntu2_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/main/d/d-conf/libdconf1_0.24.0-2_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/main/d/d-conf/dconf-gsettings-backend_0.24.0-2_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/main/l/less/less_481-2.1ubuntu0.2_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/main/a/at-spi2-atk/libatk-bridge2.0-0_2.18.1-2ubuntu1_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/main/g/gtk+3.0/libgtk-3-0_3.18.9-1ubuntu3.3_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/universe/s/shine/libshine3_3.1.0-4_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/universe/libb/libbluray/libbluray1_0.9.2-2_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/universe/b/boost-defaults/libboost-date-time-dev_1.58.0.1ubuntu1_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/universe/b/boost1.58/libboost-log1.58-dev_1.58.0+dfsg-5ubuntu3.1_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/universe/b/boost1.58/libboost-math1.58.0_1.58.0+dfsg-5ubuntu3.1_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/universe/n/netcdf/libnetcdf11_4.4.0-2_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/universe/s/spatialite/libspatialite7_4.3.0a-5_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/main/q/qt4-x11/libqt4-xml_4.8.7+dfsg-5ubuntu2_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/main/q/qt4-x11/libqt4-svg_4.8.7+dfsg-5ubuntu2_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/universe/v/vtk6/libvtk6-java_6.2.0+dfsg1-10ubuntu0.1_amd64.deb  Hash Sum mismatch

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ubuntu/pool/universe/w/wxpython3.0/python-wxgtk3.0_3.0.2.0+dfsg-1build1_amd64.deb  Hash Sum mismatch

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

应该就是Hash Sum mismatch,哈希值不匹配的问题,查阅了网上很多解决办法,基本都试过了,包括:删除list文件下内容,重新建立文件夹更新源;换源(但不知道换的对不对,是在dockerfile文件中换的);按照提示maybe run apt-get update or try with --fix-missing?修复;这三个方法暂时都不行,麻烦各位网友给点意见吧!

  • 写回答

1条回答 默认 最新

  • 叼不起的烟斗 2022-03-18 14:42
    关注

    你这个是镜像依赖的系统源有问题,一个是dockerfile中配置换源,另一个是换一个依赖镜像,From换个其他的版本镜像试试

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 12月16日
  • 已采纳回答 12月8日
  • 创建了问题 3月18日

悬赏问题

  • ¥15 如何删除这个虚拟音频
  • ¥50 hyper默认的default switch
  • ¥15 网站打不开,提示502 Bad Gateway
  • ¥20 基于MATLAB的绝热压缩空气储能系统代码咨询
  • ¥15 R语言建立随机森林模型出现的问题
  • ¥20 unity内置语言切换的按钮设置
  • ¥15 中级微观经济学,生产可能性边界问题
  • ¥15 TCP传输时不同网卡传输用时差异过大
  • ¥15 请各位看看我写的属于什么算法,或者有更正确的写法?
  • ¥15 html5 qrcode 扫描器