Ubuntu apt 出错解决办法: Problem parsing dependency Depends

问题:

Reading package lists... Error!
E: Problem parsing dependency Depends
E: Error occurred while processing xxxxx (NewVersion2)
E: Problem with MergeList /var/lib/apt/lists/ftp.debian.org_debian_dists_squeeze_main_binary-amd64_Packages
E: The package lists or status file Could not be parsed or opened.

the one thing that stands out the most to me is that it’s happening with the same MergeList off the very same package mirror and directory of that mirror. This naturally leads me to wonder if there isnt something in that mirror folder thats corrupt,or something there thats causing users’ local package databases to become corrupt. Even that swapping around of the status file in /var/lib/dpkg didnt seem to help at all. Any suggestions?
Hmm,sorry chris,only just saw this post on the thread,so apologies for the necropost to ALL. But,since this thread started I have found out a couple of methods for fixing these sort of errors without reverting to any drastic measures,and that normally work. If for anything,I will document them here for posterity.

First,dpkg has some neat options for fixing some problems,especially those with the “available” file. Here’s the link…

…of particular use is the…

Code:

dpkg --clear-avail

…command,when update complains of problems with the available file. And when there are problems with the MergeList,as in your case,simply clear them out with…

Code:

rm /var/lib/apt/lists/* --force

For both cases,a subsequent apt-get update appears to fix most problems. I seem to have “discovered” that if you use dpkg,on Debian,taking the time to learn dpkg’s varIoUs command facets is one of the most worthwhile things you can do.

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...