Author Topic: [SOLVED] Synaptic DB corrupt: The dreaded E: error message.  (Read 1949 times)

Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
[SOLVED] Synaptic DB corrupt: The dreaded E: error message.
« on: September 28, 2010, 10:24:48 AM »
I hope someone can sort me out here!

Suddenly, Synaptic started giving me the E: RPM database iterator error.

Code: [Select]
rpm --rebuilddb
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30974) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30974)

I have done a fsck -v on the / partition (from a live disc), no error reported.

Where can I go from here? Please help me avoid a reinstall (which is, embarrassingly, all I can think of myself now)!

Cheers!
CJ
« Last Edit: October 03, 2010, 04:50:39 PM by CJ »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Synaptic DB corrupt: The dreaded E: error message.
« Reply #1 on: September 28, 2010, 12:37:41 PM »
CJ,
With Synaptic closed, open /var/cache/apt as root and delete the 2 .bin files there. Next open /var/lib/apt/lists and delete the list files there.  Next, open Synaptic and click Reload.

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3981
Re: Synaptic DB corrupt: The dreaded E: error message.
« Reply #2 on: September 28, 2010, 12:47:13 PM »
No, it's the rpm database which is corrupt, not the package list database. Try the following to delete it and start again:
Code: [Select]

rm -f /var/lib/rpm/__db*
rpm --rebuilddb
« Last Edit: September 30, 2010, 03:23:18 AM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Synaptic DB corrupt: The dreaded E: error message.
« Reply #3 on: September 28, 2010, 12:50:21 PM »
No, it's the rpm database which is corrupt, not the package list database. Try the following to delete it and start again:
Code: [Select]

rm -f /var/lib/rpm/__db*
db_verify /var/lib/rpm/Packages
rpm --rebuilddb

Oops! :o I misread it. ::)

Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: Synaptic DB corrupt: The dreaded E: error message.
« Reply #4 on: September 28, 2010, 12:55:02 PM »
No, it's the rpm database which is corrupt, not the package list database. Try the following to delete it and start again:
Code: [Select]

rm -f /var/lib/rpm/__db*
db_verify /var/lib/rpm/Packages
rpm --rebuilddb


Code: [Select]
db_verify /var/lib/rpm/Packages
bash: db_verify: command not found

Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: [NOT SOLVED] Synaptic DB corrupt: The dreaded E: error message.
« Reply #5 on: September 29, 2010, 05:49:28 AM »
Sorry people, but not resolved after all...

Today, Synamptic reported a broken package. When trying to repair it and downloading the app/file, another RMPDB error was reported.

Trying to do another rpm --rebuilddb gave a lot of error, first line a general one, then a lot of lines about specific applications (numbered).

I shall try to post the errors as I can. Problem is, as soon as I do the above, apps starts crashing radomly (or rather, so far, firefox did when trying to post). Hence, look out for my next post, hopefully with the specific errors.

Living without Synaptic? Not an option, me thinks, so please see if you can help this poor sod!

Cheers!
CJ

Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: [NOT SOLVED] Synaptic DB corrupt: The dreaded E: error message.
« Reply #6 on: September 29, 2010, 06:07:16 AM »
Hm, after a reboot, rmp --rebuilddb ran fine. I do, however, now get a warning about a dupe library (the one that was previously fixed as broken).
When searching for the package, I see only one line, though. How do I go about removing the dupe?

This is from Synaptic:
Code: [Select]
W: There are multiple versions of "libbinutils2" in your system.

This package won't be cleanly updated, unless you leave
only one version. To leave multiple versions installed,
you may remove that warning by setting the following
option in your configuration file:

RPM::Allow-Duplicated { "^libbinutils2$"; };

To disable these warnings completely set:

RPM::Allow-Duplicated-Warning "false";

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: [NOT SOLVED] Synaptic DB corrupt: The dreaded E: error message.
« Reply #7 on: September 29, 2010, 07:39:00 AM »
Do you have dupeclean installed? (There is a dupeclean-gui as well.) Run it to clean up the duplicate. Otherwise, you will need to run a search in Synaptic for the name of the duplicated RPM and mark the older version (lower number) for removal.


Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: [NOT SOLVED] Synaptic DB corrupt: The dreaded E: error message.
« Reply #8 on: September 29, 2010, 08:27:28 AM »
Do you have dupeclean installed? (There is a dupeclean-gui as well.) Run it to clean up the duplicate. Otherwise, you will need to run a search in Synaptic for the name of the duplicated RPM and mark the older version (lower number) for removal.

Neal, that's the strange thing: The package is 'libbinutils2' and when searching for it, only one line shows up, although it shows up as 'libbinutils2#2...', which I assume denotes that it is the second one. In other words, even though Synaptic is complaining about it, no line shows the 'first' instance.

I shall try to look into dupeclean... I am just worried it goes deeper and I might break something (more).

Cheers!
CJ

Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: [NOT SOLVED] Synaptic DB corrupt: The dreaded E: error message.
« Reply #9 on: September 29, 2010, 08:30:22 AM »
Dupeclean runs, but the problem persists. Synaptic is still complaining about the dupe.

EDIT: When looking under 'force version', it looks like it's the same version installed twice. That would explain why Dupeclean does not take it, I guess.

CJ
« Last Edit: September 29, 2010, 08:35:57 AM by CJ »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: [NOT SOLVED] Synaptic DB corrupt: The dreaded E: error message.
« Reply #10 on: September 29, 2010, 08:50:13 AM »
Dupeclean runs, but the problem persists. Synaptic is still complaining about the dupe.

EDIT: When looking under 'force version', it looks like it's the same version installed twice. That would explain why Dupeclean does not take it, I guess.

CJ

If it is installed twice, it should be listed twice in Synaptic in Installed. If it is, remove one. If not, follow kjpetrie's instructions on rebuilding the database.

Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: [NOT SOLVED] Synaptic DB corrupt: The dreaded E: error message.
« Reply #11 on: September 29, 2010, 08:54:11 AM »
If it is installed twice, it should be listed twice in Synaptic in Installed. If it is, remove one. If not, follow kjpetrie's instructions on rebuilding the database.

It is only listed on one line (but with the aforementioned #2), but still Synaptic warn of twice installed.

I have already done the steps. rpm --rebuilddb no longer reports issues.
One thing, though: the db_verify step fails with unknown command. Is that something that should be installed, or is there a spelling mistake?

CJ

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: [NOT SOLVED] Synaptic DB corrupt: The dreaded E: error message.
« Reply #12 on: September 29, 2010, 09:13:44 AM »
Mark libbinutils2#2 for removal. What happens? Are other packages requested to be removed? If so, do not mark them!!! If not, proceed with the removal. After the removal,do not close Synaptic! Search again for libbinutils2. Does it show as installed? If yes, you should be fine. If not, install it.

You are running db_verify /var/lib/rpm/Packages as root (su)? You are running it immediately after rm -f /var/lib/rpm/__db* and before rpm --rebuilddb?


Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: [NOT SOLVED] Synaptic DB corrupt: The dreaded E: error message.
« Reply #13 on: September 30, 2010, 03:11:09 AM »
Mark libbinutils2#2 for removal. What happens? Are other packages requested to be removed? If so, do not mark them!!! If not, proceed with the removal. After the removal,do not close Synaptic! Search again for libbinutils2. Does it show as installed? If yes, you should be fine. If not, install it.
A wide bunch of packages shall be removed alongside it. From just glancing down the list, I have no doubt that removing them will bork the system.

You are running db_verify /var/lib/rpm/Packages as root (su)? You are running it immediately after rm -f /var/lib/rpm/__db* and before rpm --rebuilddb?

Yes, and yes.

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3981
Re: [NOT SOLVED] Synaptic DB corrupt: The dreaded E: error message.
« Reply #14 on: September 30, 2010, 03:22:53 AM »
I got the instructions from a fedora forum after googling the error message. Pclos doesn't seem to have db_verify (or it's in a package not installed by default). I'll remove it from my suggestion.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf