Linux中国
修复 Ubuntu 中 “E: The package cache file is corrupted, it has the wrong hash”
今天,我尝试更新我的 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

Ubuntu 中的 “The package cache file is corrupted, it has the wrong hash” 错误
经过一番谷歌搜索,我找到了解决此错误的方法。
如果你遇到过这个错误,不要惊慌。只需运行下面的命令修复。
在运行命令之前,请再次确认你在最后加入了 *。在命令最后加上 * 很重要。如果你没有添加,它会删除 /var/lib/apt/lists/*目录,而且无法恢复。我提醒过你了!
$ sudo rm -rf /var/lib/apt/lists/*
现在我再次使用下面的命令更新系统:
$ sudo apt update

现在好了!希望它有帮助。
作者:sk 选题:lujun9972 译者:geekpi 校对:wxy
本文转载来自 Linux 中国: https://github.com/Linux-CN/archive
对这篇文章感觉如何?
太棒了
0
不错
0
爱死了
0
不太好
0
感觉很糟
0
More in:Linux中国
Let's Encrypt 正式发布,已经保护 380 万个域名
由于 Let's Encrypt 让安装 X.509 TLS 证书变得非常简单,所以这个数量增长迅猛。
关于Linux防火墙iptables的面试问答
Nishita Agarwal是Tecmint的用户,她将分享关于她刚刚经历的一家公司(印度的一家私人公司Pune)的面试经验。在面试中她被问及许多不同的问题,但她是iptables方面的专家,因此她想分享这些关于iptables的问题和相应的答案给那些以后可能会进行相关面试的人。 所有的问题和相应的答案都基于Nishita Agarwal的记忆并经过了重写。 嗨,朋友!我叫Nishita Agarwal。我已经取得了理学学士学位,我的专业集中在UNIX和它的变种(BSD,Linux)。它们一直深深的吸引着我。我在存储方面有1年多的经验。我正在寻求职业上的变化,并将供职于印度的P
Lets Encrypt 已被所有主流浏览器所信任
旨在让每个网站都能使用 HTTPS 加密的非赢利组织 Lets Encrypt 已经得了 IdenTrust的交叉签名,这意味着其证书现在已经可以被所有主流的浏览器所信任。从这个里程碑事件开始,访问者访问使用了Lets Encrypt 证书的网站不再需要特别配置就可以得到 HTTPS 安全保护了。 Lets Encrypt 的两个中级证书 ...
SSL/TLS 加密新纪元 – Lets Encrypt
根据 Let's Encrypt 官方博客消息,Let's Encrypt 服务将在下周(11 月 16 日)正式对外开放。 Let's Encrypt 项目是由互联网安全研究小组(ISRG,Internet Security Research Group)主导并开发的一个新型数字证书认证机构(CA,Certificate ...

















