LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-03-2011, 06:57 PM   #1
feeblebrain
Member
 
Registered: Feb 2011
Posts: 55

Rep: Reputation: 0
apt-get problem (Problem parsing dependency Depends)


Hi,

I have this report from the apt-get update;

Code:
E: Problem parsing dependency Depends
E: Error occurred while processing vbuf (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.
E: _cache->open() failed, please report.
I have had it before a couple of times, and fixed it by manually weeding through some file or another (in the very /var folder, somewhere, if I am not mistaken) and correcting some <obvious> errors, but cannot ever remember which it is.

However...

I am documenting it here this time, for posterity, as it has happened more than once.

What solutions do you suggest, please?

My thanks in advance.
 
Old 10-03-2011, 07:58 PM   #2
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
I think we would have to see your sources.list, at least, to have a clue.
 
Old 10-03-2011, 10:33 PM   #3
feeblebrain
Member
 
Registered: Feb 2011
Posts: 55

Original Poster
Rep: Reputation: 0
Hi,

Sure thing. Here it is...

Code:
# 

# deb cdrom:[Debian GNU/Linux 6.0.0 _Squeeze_ - Official Snapshot amd64 LIVE/INSTALL Binary 20110206-06:35]/ squeeze main

# Debian Security Repository
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

# Debian ftp 
deb http://ftp.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.debian.org/debian/ squeeze main contrib non-free

# Debian Multimedia Squeeze
deb ftp://ftp.debian-multimedia.org squeeze main non-free
deb-src ftp://ftp.debian-multimedia.org squeeze main non-free
Some additional information. I half remembered / half found again the file I used to edit to fix this problem;

/var/lib/dpkg/status

I am presently ploughing my way through it.

The problem, in this instance, started right after installing Chromium web browser, via synaptic (because Google keeps complaining that Iceweasel 3.5.16, which I normally use, is "outdated"!!). By the way, this is on my 64 bit rig, which runs standard "Squeeze" AMD64.

Thanks.

EDIT:

So, tell me if I have made a mess of things. In /var/lib/dpkg, there was a file;

status-old

I backed up my original status file (status-faulty) and renamed status-old to status. Then, I changed my sources list to my nearest mirrors - Mexico. My new sources list;

Code:
# deb cdrom:[Debian GNU/Linux 6.0.0 _Squeeze_ - Official Snapshot amd64 LIVE/INSTALL Binary 20110206-06:35]/ squeeze main

# Debian Security Repository
deb http://security.debian.org/ squeeze/updates main contrib non-free 
deb-src http://security.debian.org/ squeeze/updates main contrib non-free 

## Debian.org
deb http://ftp.mx.debian.org/debian/ squeeze main contrib non-free 
deb-src http://ftp.mx.debian.org/debian/ squeeze main contrib non-free 

## proposed
deb http://ftp.mx.debian.org/debian/ squeeze-proposed-updates main contrib non-free 
deb-src http://ftp.mx.debian.org/debian/ squeeze-proposed-updates main contrib non-free 

# Debian Multimedia Squeeze
deb ftp://ftp.debian-multimedia.org squeeze main non-free
deb-src ftp://ftp.debian-multimedia.org squeeze main non-free
And ran apt-get update, which does not present any errors now. But, because it was the old status (I imagine) the Update Manager appears to have "reinstalled" some of the packages that were elements of the last upgrade, from the new repositories.

When the process gets to the pre-configure part, it starts identifying the lines in another file that present errors. That file is;

/var/lib/dpkg/available

This is now familiar, as it was the same thing the last time. There are character errors in the file (eg; "daem/n" instead of "daemon"), and it is a case now of locating these and correcting them, unless anyone knows a better way? Anyway, at least I have it documented here this time...

Thanks in advance!

Last edited by feeblebrain; 10-04-2011 at 12:37 AM.
 
Old 10-04-2011, 04:28 AM   #4
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
You should not be getting these problems and you should certainly not be messing around in /var/lib/dpkg/ as those files are irreplaceable. If you insist on messing about in there make a backup of the whole directory first.

I would suggest you back up your data and reinstall. A corrupt package database is going to be a nightmare in the long run. Be careful of what you install from outside of the repos in future.
 
Old 10-04-2011, 02:39 PM   #5
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Yes, that sounds like a real good idea. I do not like reinstalling on general principles but it is the best route for some problems.

One thing, and I will get jumped on for this, that I would recommend is quit using Update Mangler. I don't like it because I have had problems with it. Use Synaptic to do your update/upgrade chores if you want a gui. Apt-get or aptitude is even a better idea.
 
Old 10-04-2011, 02:55 PM   #6
feeblebrain
Member
 
Registered: Feb 2011
Posts: 55

Original Poster
Rep: Reputation: 0
Hi,

Quote:
Originally Posted by Caravel View Post
You should not be getting these problems...
Maybe not, but I am, and this is the third time it has happened in nine months. But before we go off arbitrarily assuming that I am being a ham-fisted cowboy causing these problems myself by messing around with system files, the following should be taken into account;

1. I do not "mess around" with any system folders or files while the system is up and running in good order. My prerogative is the old adage; "if it ain't broke, don't fix it". The problem described has occurred on the occasions it has after perfectly legitimate use of apt-get, Synaptic Package Manager or Update Manager, using only the Debian repositories. The Chromium Web Browser I installed was from these repo's, not the one that pops up on Google saying "install Chrome". I am clear on that.

2. Here is a list of programs installed from source, none of which ever caused any problems subsequently; Code::Blocks, Allegro 5.0.4, Stellarium, and from separate downloadable debs, Google Earth and Skype, for AMD64. Any dependencies these applications required were installed by apt-get.

3. After restoring the status-old file as status (with the respective backing up, as always - I am relatively new to Linux but not to computers or OS's by a long shot, say since 1986) the terminal itself points me to the errors in the available file (during the upgrade phase), even identifying the line numbers where the error is, and what to look for. I assume this information is provided in order to give the problem the required attention(?).

It is all working fine again, now. I am loathe to reinstall the whole OS, really, and keep that solution as a last resort, or else I am not learning anything about the "new OS" maintenance. If I post the problem here it is with the express purpose acquiring the knowledge (if anyone is kind enough to impart it, of course) of any specific procedures or tools available that I may not be aware of. Seems there's none for this particular one.

Now, what might be the root causes of the dpkg file corruptions that occur from time to time? Is it possible that sporadic interruptions to the internet connection could be causing the file to corrupt during the apt-get update sequence?

In any case; all is well. Thank you!

Last edited by feeblebrain; 10-04-2011 at 02:59 PM.
 
Old 10-04-2011, 03:04 PM   #7
feeblebrain
Member
 
Registered: Feb 2011
Posts: 55

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by widget View Post
Yes, that sounds like a real good idea. I do not like reinstalling on general principles but it is the best route for some problems.

One thing, and I will get jumped on for this, that I would recommend is quit using Update Mangler. I don't like it because I have had problems with it. Use Synaptic to do your update/upgrade chores if you want a gui. Apt-get or aptitude is even a better idea.
Thanks for that. I will be sure not to use Update Mangler again. It is very possible that it IS causing my problem, as the problem has "coincidentally" appeared (on the total three occasions) after sessions during which it was used, now that I come to think of it. Good point.

Last edited by feeblebrain; 10-04-2011 at 03:05 PM.
 
Old 11-09-2011, 03:02 PM   #8
chris71mach1
LQ Newbie
 
Registered: Apr 2005
Location: DFW
Distribution: Debian
Posts: 21

Rep: Reputation: 1
what ended up being the root cause of this issue? I have a Debian Squeeze box that doesnt even run a gui (doesnt even have any installed, no less), and i came up today with a disturbingly similar error to yours, feeblebrain.

Code:
Reading package lists... Error!
E: Problem parsing dependency Depends
E: Error occurred while processing lIbpqxx-2.6.9ldbl (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?
 
Old 11-09-2011, 03:08 PM   #9
chris71mach1
LQ Newbie
 
Registered: Apr 2005
Location: DFW
Distribution: Debian
Posts: 21

Rep: Reputation: 1
and i raise my hands to the sky and thank google for all the answers i could ask for. after deleting the status file and replacing it with status-old, i ended up getting the following:

Code:
Segmentation faultsts... 21%
so after a little research, i found somebody who had a similar issue, and fixed it by blowing out the .bin files in the /var/cache/apt folder:

Code:
sudo rm /var/cache/apt/*.bin
after a couple of attempts to apt-get update, it finally succeeded without issue. after that, a clean, error-less apt-get upgrade to bring any stale packages up to date, and life is cool!
 
Old 01-10-2012, 02:53 PM   #10
feeblebrain
Member
 
Registered: Feb 2011
Posts: 55

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chris71mach1 View Post
what ended up being the root cause of this issue? I have a Debian Squeeze box that doesnt even run a gui (doesnt even have any installed, no less), and i came up today with a disturbingly similar error to yours, feeblebrain.

Code:
Reading package lists... Error!
E: Problem parsing dependency Depends
E: Error occurred while processing lIbpqxx-2.6.9ldbl (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...

debianadmin

...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.

Again, very sorry for the necropost...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help with apt-get: dependency error (Depends: but is not going to be installed) Avatar Debian 7 08-21-2009 10:01 AM
apt-get dependency problem trebek Ubuntu 3 01-15-2008 06:16 PM
Apt dependency problem.. AdBus Ubuntu 3 09-02-2006 09:28 AM
apt-get dependency problem (with skype) eantoranz Linux - Software 7 02-16-2006 07:26 PM
parsing strings problem McB Programming 6 04-19-2004 09:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration