参考:ubuntu: apt-get update的时候遇到“Hash Sum mismatch”错误

在安装Mininet的时候,apt-get update的时候遇到了这个问题:

W: Failed to fetch http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/trusty/main/binary-i386/Packages  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.

这个问题总结就是:“总的来说就是提供源的服务器的问题。”

解决方法有三种:

1.清除之前的缓存,重新apt-get update

sudo apt-get clean
sudo apt-get update --fix-missing

2.system settings => 换源

3./var/lib/apt/lists

sudo rm -fR /var/lib/apt/lists/*  

sudo mkdir /var/lib/apt/lists/partial  

sudo apt-get update

讲道理,一般来说到这里应该已经解决了,但是我依然哈希值不匹配...

在百度无果之后,转投谷歌,终于在Ubuntu forums中找到了答案,链接:关于引起更新源索引时Hash Sum mismatch问题的真正原因及解决方案

原因:

This is a known issue, and is exacerbated for clients behind proxy caches. Some large organisations and ISPs (especially in remote parts of the world) have transparent caches of which you may not be aware.

The fundamental issue is that the apt repository format is subject to race conditions when a mirror is updated. This problem particularly affects repositories that change rapidly, such as the development release.

You can track progress on the fix for this in this bug (please mark yourself as "affects me too" in the bug) and this blueprint. But be aware that it is a complex issue and may take more than one release to resolve.

shareimprove this answer

answered Jul 5 '12 at 22:21

中文翻译,来自上面链接:

你所使用的网络供应商,有些会设置一些透明缓存,以增加网络内部速度,减少出口的流量,你获取的某些文件不是源服务器上的真正文件,是从缓存中获取的,当缓存中获取的一些校验信息跟源中不一致的时候,自然提示校验失败,无法继续更新.

此问题实际上跟apt软件仓库的格式设计有关。新发布的版本的软件仓库更新比较频繁,按道理缓存中的文件应该同步更新,可惜因为多个镜像站点的有快慢,因此造成了缓存无法保证一致性。

当网络提供商足够有实力,不设至透明缓存时,这个问题是不存在的。这就是为什么有些人反馈使用无线上网卡(移动、联通的3g网络)就一切OK,一单换回长城宽带、或者宽带通就不行了。

我使用的解决方法很简单:开热点,不使用宿舍的wifi环境,直接绕开透明缓存。

2017/1/3 1/4更新

2/17更新:

今天又遇到了这个情况,不过不一样的是,我使用的是PC端,而且没有装wifi网卡,故无法使用上述办法。

但是使用上述的方法2换了个源,就解决了。

system settings => 换源

Ubuntu apt-get "Hash Sum mismatch" 问题解决方法的更多相关文章

  1. Ubuntu Hash Sum mismatch 解决方法

    有时候通过校园网对Ubuntu14.04进行更新时,会出现以下问题: W: Failed to fetch http://xxxxxxx Hash Sum mismatch 解决方法:打开搜索 →  ...

  2. apt-get update 更新 ubuntu时出现Hash sum mismatch的原因及解决方法

    $ sudo apt-get update ...... Hit http://mirrors.163.com trusty/main Sources                          ...

  3. ubuntu 安装时遇到 hash sum mismatch 处理方法

    ubuntu安装大软件时,下载经常容易出错,hash sum mismatch是其中一种,说到底还是网络不好,重试很多遍都是这个错误,最后的解决方案是把mismatch说的那个链接用firefox打开 ...

  4. 163源报错Hash Sum mismatch 解决方法

    Ubuntu server 用的163的源,报错: W: Failed to fetch http://mirrors.163.com/ubuntu/dists/precise-updates/mai ...

  5. Ubuntu更新提示哈希和不匹配“Hash Sum mismatch”

    Ubuntu更新提示哈希和不匹配"Hash Sum mismatch" 今天在常规更新软件的时候,我的ubuntu报了一个错误. 应该是ubuntu程序更新转交给另外一个更新造成 ...

  6. 升级ubuntu,apt-get update出现Hash Sum mismatch

    sudo apt-get update 出现Hash Sum mismatch cd /var/lib/apt sudo rm -fr lists sudo mkdir lists sudo mkdi ...

  7. apt-get update更新源时,出现“Hash Sum mismatch”问题

    当使用apt-get update更新源时,出现下面"Hash Sum mismatch"的报错,具体如下:root@localhost:~# apt-get update.... ...

  8. Jetson tk1 hash sum mismatch

    sudo apt-get update遭遇Hash Sum Mismatch 修改DNS服务器地址: sudo gedit /etc/resolv.conf 解决办法: 在装有goagent的情况下: ...

  9. ubuntu hash sum mismatch error

    $ sudo rm -rf /var/lib/apt/lists/* $ sudo apt-get update from: askubuntu.com

随机推荐

  1. 详细解读Android中的搜索框—— SearchView

    以前总是自己写的 今天看看别人做的 本篇讲的是如何用searchView实现搜索框,其实原理和之前的没啥差别,也算是个复习吧. 一.Manifest.xml 这里我用一个activity进行信息的输入 ...

  2. difference bewteen *args and **args in python?

    It's also worth noting that you can use * and ** when calling functions as well. This is a shortcut ...

  3. 从jquery里的$.ajax()到angularjs的$http

    jquery中对ajax的使用做了很多封装,使得我们使用习惯了,反而并不大清楚在请求过程中的一些细节. 在第一次使用angularjs的$http时,后台一直接受不到前端请求的数据,于是小小研究了一下 ...

  4. [转]关于Android系统的”点九”

    李华明Himi原创,转载务必在明显处注明:转载自[黑米GameDev街区] 原文链接: http://www.himigame.com/android-game/321.html 前几天群成员讨论过关 ...

  5. linux 使用 nvidia 的 gpu

    第一种方法: [Wizard@Wizard ~]$ nvidia-detect kmod-nvidiaOptimus hardware detected: An Intel display contr ...

  6. jQuery hover事件

    hover(over,out)一个模仿悬停事件(鼠标移动到一个对象上面及移出这个对象)的方法.这是一个自定义的方法,它为频繁使用的任务提供了一种"保持在其中"的状态. 当鼠标移动到 ...

  7. 读取properties文件方式

    //src目录下 static Properties pro = new Properties(); //jar包时用(ide也可以) // pro.load(Tool.class.getClassL ...

  8. Sublime Text 2 增加python版本

    当系统中装有多个python版本时,Sublime Text 2  使用哪个版本需要手动添加 键入一下内容,path输入python的安转路径 保存至Python27.sublime-build文件 ...

  9. [译]:Orchard入门——给网站添加页面

    原文链接:Adding Pages to Your Site 注:内容为官方文档翻译,本人遇到的page中间是布局,而非官网的body--但此内容可以在内容定义里自行修改(本文不做介绍) 在创建Orc ...

  10. Hibernate的检索方式

    Hibernate的检索方式 检索方式(查询的方式) 导航对象图检索方式: 根据已经加载的对象导航到其他对象 Customer customer = (Customer)session.get(Cus ...