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.

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值