暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

修复Ubuntu中的'E:包缓存文件hash值错误'问题

开源视界 2020-04-08
307
今天,我尝试在我的Ubuntu 18.04 LTS桌面系统上更新仓库列表,但是得到了一个错误: E: The package cache file is corrupted, it has the wrong hash。下面是我当时运行的命令和输出:
$ sudo apt update
输出示例:
Hit:1 http://it-mirrors.evowise.com/ubuntu bionic InRelease
Hit:2 http://it-mirrors.evowise.com/ubuntu bionic-updates InRelease
Hit:3 http://it-mirrors.evowise.com/ubuntu bionic-backports InRelease
Hit:4 http://it-mirrors.evowise.com/ubuntu bionic-security InRelease
Hit:5 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu bionic InRelease
Hit:7 http://ppa.launchpad.net/leaeasy/dde/ubuntu bionic InRelease
Hit:8 http://ppa.launchpad.net/rvm/smplayer/ubuntu bionic InRelease
Ign:6 https://dl.bintray.com/etcher/debian stable InRelease
Get:9 https://dl.bintray.com/etcher/debian stable Release [3,674 B]
Fetched 3,674 B in 3s (1,196 B/s)
Reading package lists... Done
E: The package cache file is corrupted, it has the wrong hash
通过Google检索后我找到了一个解决问题的方法。
如果你也遇到过这个问题,不要恐慌。运行下面的命令来对其进行修复即可。
在运行下面的命令前,再次检查你在末尾添加了*。因为在命令末尾加上*是非常重要的。如果你不加,它将会删除/var/lib/apt/listss/目录。
$ sudo rm -rf var/lib/apt/lists/*
现在我尝试通过下面的命令来更新系统软件列表:
$ sudo apt update
这次它工作得非常好,希望这对你有帮助。

使用structflow更改晶体结构中原子的位置
开源结构有限元软件CalculiX
Linux 命令 chown 简介
开源多物理场有限元软件Elmer
LabPlot替代Origin用于科研绘图
Octave科学计算编程语言
Quantum ESPRESSO教程之电子局域函数计算(Pymatflow篇)
开源多物理场有限元软件MOOSE
Quantum ESPRESSO教程之态密度能带结构计算(Pymatflow篇)
本文译自: Fix ‘E: The package cache file is corrupted, it has the wrong hash’ Error In Ubuntu
译者:生材有道
校对:开源科学计算
原文链接:https://www.ostechnix.com/fix-e-the-package-cache-file-is-corrupted-it-has-the-wrong-hash-error-in-ubuntu/
原文及本文遵循: CC BY-NC 4.0协议



文章转载自开源视界,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论