您的位置 首页 网络技术

hash sum mismatch错误解决方案

当使用apt-get update更新源时,出现下面“Hash Sum mismatch”的报错,具体如下:
root@localhost:~# apt-get update
……
……
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/main/source/Sources Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/restricted/source/Sources Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/source/Sources Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/multiverse/source/Sources Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/main/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/main/binary-i386/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-i386/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-i386/Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.

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

解决办法:
1)删掉/var/lib/apt/lists 这个目录下的东西
sudo rm -fR /var/lib/apt/lists/*
2)新建相应文件夹
sudo mkdir /var/lib/apt/lists/partial
3)重新update
sudo apt-get update

猫叔总结了 适合新手操作的副业 《淘宝虚拟产品月入2万的 6个 细分类目》的电子书 仅供参考

如果你对虚拟产品比较感兴趣,可以点击:

淘宝卖什么虚拟产品赚钱(月入2万+)

hadoopall

关于花猫大叔短视频创业 作者: hadoopall

热门文章

发表评论

电子邮件地址不会被公开。