无法获取...哈希总和不匹配。尝试了 rm apt/list,但没有起作用

无法获取...哈希总和不匹配。尝试了 rm apt/list,但没有起作用

正如您在标题上看到的,我收到了“无法获取...哈希总和不匹配”错误。我尝试过这种方法:

sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update

但它不起作用。我仍然收到相同的错误。

Err http ://vn.archive.ubuntu.com trusty-updates/universe amd64 Packages
Get:99 http ://vn.archive.ubuntu.com trusty-updates/universe amd64 Packages [1,789 B]
Get:100 http ://vn.archive.ubuntu.com trusty-updates/main i386 Packages [1,789 B]
Fetched 28.3 MB in 5min 15s (89.8 kB/s) 
W: Failed to fetch http://vn.archive.ubuntu.com/ubuntu/dists/trusty/main/source/Sources  Hash Sum mismatch
W: Failed to fetch http://vn.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/source/Sources  Hash Sum mismatch
W: Failed to fetch http://vn.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages  Hash Sum mismatch
W: Failed to fetch http://vn.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-i386/Packages  Hash Sum mismatch
W: Failed to fetch http://vn.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-i386/Packages  Hash Sum mismatch
W: Failed to fetch http://vn.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/i18n/Translation-en  Hash Sum mismatch
W: Failed to fetch http://vn.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/i18n/Translation-en  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.

请帮忙!非常感谢!

答案1

如果删除/var/lib/apt/lists/*不起作用...
(特别是如果你使用了代理),像这样修复“哈希值不匹配”

创建文件 /etc/apt/apt.conf.d/99fixbadproxy
有此内容

Acquire::http::Pipeline-Depth 0;
Acquire::http::No-Cache true;
Acquire::BrokenProxy    true;

也可以看看这里

答案2

我以前也遇到过同样的问题jp.archive.ubuntu.com,通常它会在几个小时后消失,所以我的猜测是它与你的镜像与主镜像的同步有关(IE,您正在同步软件包列表)。切换到另一个镜像使这种情况发生的次数大大减少(尽管这种情况仍然时不时发生),因此您可能想尝试一下。(这是存档镜像列表

相关内容