加入收藏 | 设为首页 | 会员中心 | 我要投稿 南京站长网 (https://www.025zz.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Windows > 正文

修复Ubuntu中 “E: The package cache file is corrupted, it has th

发布时间:2019-08-23 06:15:16 所属栏目:Windows 来源:Sk
导读:今天,我尝试更新我的 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/ubun

修复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”。这是我在终端运行的命令以及输出:

  1. $ sudo apt update

示例输出:

  1. Hit:1 http://it-mirrors.evowise.com/ubuntu bionic InRelease
  2. Hit:2 http://it-mirrors.evowise.com/ubuntu bionic-updates InRelease
  3. Hit:3 http://it-mirrors.evowise.com/ubuntu bionic-backports InRelease
  4. Hit:4 http://it-mirrors.evowise.com/ubuntu bionic-security InRelease
  5. Hit:5 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu bionic InRelease
  6. Hit:7 http://ppa.launchpad.net/leaeasy/dde/ubuntu bionic InRelease
  7. Hit:8 http://ppa.launchpad.net/rvm/smplayer/ubuntu bionic InRelease
  8. Ign:6 https://dl.bintray.com/etcher/debian stable InRelease
  9. Get:9 https://dl.bintray.com/etcher/debian stable Release [3,674 B]
  10. Fetched 3,674 B in 3s (1,196 B/s)
  11. Reading package lists... Done
  12. E: The package cache file is corrupted, it has the wrong hash

修复Ubuntu中 “E: The package cache file is corrupted, it has th

Ubuntu 中的 “The package cache file is corrupted, it has the wrong hash” 错误

经过一番谷歌搜索,我找到了解决此错误的方法。

如果你遇到过这个错误,不要惊慌。只需运行下面的命令修复。

在运行命令之前,请再次确认你在最后加入了 *。在命令最后加上 * 很重要。如果你没有添加,它会删除 /var/lib/apt/lists/*目录,而且无法恢复。我提醒过你了!

  1. $ sudo rm -rf /var/lib/apt/lists/*

现在我再次使用下面的命令更新系统:

  1. $ sudo apt update

修复Ubuntu中 “E: The package cache file is corrupted, it has th

现在好了!希望它有帮助。

【编辑推荐】

  1. Linux系统故障修复和修复技巧
  2. Linux命令三剑客:grep、sed、awk
  3. 如何在Debian/Ubuntu上设置自动安全更新(无人值守更新)
  4. IBM宣布开源Power,OpenPOWER基金会加入Linux基金会
  5. 如何在Ubuntu上设置多语言输入法
【责任编辑:庞桂玉 TEL:(010)68476606】
点赞 0

(编辑:南京站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读