当前位置: 首页 > 科技观察

在Ubuntu中修复“E-包缓存文件已损坏,它的哈希值错误”

时间:2023-03-16 13:45:32 科技观察

今天,我尝试更新我的Ubuntu18.04LTS的存储库列表,但收到一条错误消息:“E:包缓存文件已损坏,它的哈希值错误”。这是我在终端中运行的命令以及输出:$sudoaptupdate示例输出:Hit:1http://it-mirrors.evowise.com/ubuntubionicInReleaseHit:2http://it-mirrors.evowise.com/ubuntubionic-updatesInReleaseHit:3http://it-mirrors.evowise.com/ubuntubionic-backportsInReleaseHit:4http://it-mirrors.evowise.com/ubuntubionic-securityInReleaseHit:5http://ppa.launchpad.net/alessandro-strada/ppa/ubuntubionicInReleaseHit:7http://ppa.launchpad.net/leaeasy/dde/ubuntubionicInReleaseHit:8http://ppa.launchpad.net/rvm/smplayer/ubuntubionicInReleaseIgn:6https://dl.bintray.com/etcher/debianstableInReleaseGet:9https://dl.bintray.com/etcher/debianstable发布[3,674B]在3秒内获取3,674B(1,196B/s)Readingpackagelists...DoneE:Thepackagecachefileiscorrupted,ithasthewronghash"Thepackagecachefileiscorrupted,ithasthewronghash"errorinUbuntu经过一番谷歌搜索,我找到了解决方案这个错误方法。如果您遇到此错误,请不要惊慌。只需运行以下命令即可修复它。在运行命令之前,请仔细检查您是否将*放在末尾。在命令末尾添加*很重要。如果不添加,会删除/var/lib/apt/lists/*目录,而且无法恢复。我警告过你!$sudorm-rf/var/lib/apt/lists/*现在我用下面的命令再次更新系统:$sudoaptupdate现在好了!希望能帮助到你。