Fedora Linux Support Community & Resources Center
  #1  
Old 5th November 2012, 08:58 PM
griffinmt's Avatar
griffinmt Offline
Registered User
 
Join Date: Oct 2005
Location: Central Michigan
Age: 63
Posts: 189
windows_xp_2003firefox
Question Broken YUM

For some reason, yum is broken (F17 desktop) and gives an error about a bad DB.
Since yum is how updates etc are fixed, how do I go about fixing (delete/reinstall etc) yum

---------- Post added at 03:58 PM ---------- Previous post was at 01:23 PM ----------

Now I am by the failed system, this is what I get.

Quote:
error: rpmdb: BDB0113 Thread/process 721/3077977920 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
This is what I find in /var/lib/rpm.
Quote:
[root@jan rpm]# ls
Basenames __db.002 Group Obsoletename Requirename Triggername
Conflictname __db.003 Installtid Packages Sha1header
__db.001 Dirnames Name Providename Sigmd5
__________________
Martyn Griffin

Last edited by griffinmt; 5th November 2012 at 09:00 PM.
Reply With Quote
  #2  
Old 5th November 2012, 09:40 PM
marko's Avatar
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449
linuxfirefox
Re: Broken YUM

Quote:
rm -f /var/lib/rpm/__db*

rpm --rebuilddb
Note the double underscore the first command before the "db*". All that should be run as root user
Reply With Quote
  #3  
Old 5th November 2012, 09:46 PM
sidebrnz's Avatar
sidebrnz Offline
Registered User
 
Join Date: Oct 2007
Location: Freedonia
Age: 63
Posts: 2,107
linuxfirefox
Re: Broken YUM

With Linux, man is your friend. Specifically this:

man yum

Run this as root:

yum clean rpmdb

That should clean up your database. If you still have trouble:

yum clean all

may be needed, but try cleaning just the DB first; no need to use a bigger hammer than you need.
__________________
Registered Linux user #470359 and permanently recovered BOFH.

Any advice in this post is worth exactly what you paid for it.
Reply With Quote
  #4  
Old 5th November 2012, 11:18 PM
griffinmt's Avatar
griffinmt Offline
Registered User
 
Join Date: Oct 2005
Location: Central Michigan
Age: 63
Posts: 189
windows_7ie
Re: Broken YUM

I tried the clean options but I got the same results. Tomorrow I will delete the __db files then try it again. Thanks
__________________
Martyn Griffin
Reply With Quote
  #5  
Old 5th November 2012, 11:35 PM
sea's Avatar
sea Offline
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,608
linuxfedorachrome
Re: Broken YUM

I guess
Code:
yum makecache
doesnt have an effect either, right?
__________________
Fedora Manual: http://docs.fedoraproject.org
Script-Tools: https://sourceforge.net/projects/script-tools/
sudo st tweak repo toggle fedora-rawhide ; st iso dl-fed -respin && st iso usb
Reply With Quote
  #6  
Old 6th November 2012, 01:53 AM
griffinmt's Avatar
griffinmt Offline
Registered User
 
Join Date: Oct 2005
Location: Central Michigan
Age: 63
Posts: 189
windows_7ie
Re: Broken YUM

I'll try the makecache tomorrow too.
Thanks.
__________________
Martyn Griffin
Reply With Quote
  #7  
Old 15th November 2012, 05:13 PM
jozze Offline
Registered User
 
Join Date: Nov 2012
Location: Golnik, Slovenija
Age: 42
Posts: 5
linuxfirefox
Re: Broken YUM

I ran into it this morning, also. Found out it exists since F15 (see: <https://bugzilla.redhat.com/show_bug.cgi?id=739492>) Bug description is almost exact match, why the hell the bug was closed in F16?

@Marko: Lepa hvala za nasvet, prijatelj!

I followed nice advice from Marko, killed some files as he instructs. All my previous attempts were kicks in the darkness.

rm -f /var/lib/rpm/__db*

Then I issued:

rpm --rebuilddb

And:

yum clean all (to be sure everything really cleans up)

Finally:

yum makecache

And for test, I ran:

yum --skip-broken (as always!)

and it worked! Well, I lost 6 hours for this to learn the hard way.

On my way through darkness, I went even looking back in my /var/log/yum.log. There was nothing wrong. According to it, I've installed/updated during last days (bigones & notables):
- latest available kernel until now (3.6.6.1, x86_64, nothing special added to it),
- KDE 4.9.2
- yumex 3.0.9 (irrelevant, I always run yum from terminal),
- yum-langpacks 0.3.0-3.fc17,
- createrepo_c-libs-0.1.11-1.fc17.x86_64,
- os-prober-1.56-1.fc17.x86_64,
- wine-1.5.16-1.fc17.x86_64,
- perl-core-5.14.3-217.fc17.x86_64,
- my yum --version gives this output:
Code:
3.4.3
  Installed: rpm-4.9.1.3-7.fc17.x86_64 at 2012-07-03 13:20
  Built    : Fedora Project at 2012-05-07 10:05
  Committed: Panu Matilainen <pmatilai at redhat.com> at 2012-05-07

  Installed: yum-3.4.3-29.fc17.noarch at 2012-09-08 14:39
  Built    : Fedora Project at 2012-08-28 14:32
  Committed: Zdenek Pavlas <zpavlas at redhat.com> at 2012-08-28

  Installed: yum-plugin-aliases-1.1.31-4.fc17.noarch at 2012-07-03 19:58
  Built    : Fedora Project at 2012-01-26 20:48
  Committed: James Antill <jamesfedora at project.org> at 2012-01-26

  Installed: yum-plugin-fastestmirror-1.1.31-4.fc17.noarch at 2012-07-03 19:53
  Built    : Fedora Project at 2012-01-26 20:48
  Committed: James Antill <jamesfedora at project.org> at 2012-01-26
The incriminated version of RPM from the bug above was 4.9.1.1-1at opening in F15 and 4.9.1.1-3 at closing in F16.
I normally run su in Konsole, as one thread (i7 allows me 8 independent threads). It would interesting which version of yum/rpm Griffin has.

If somebody wants my yum.log, I backed it up a copy before rebuilding databases.
Reply With Quote
  #8  
Old 5th April 2013, 12:16 AM
samtuke Offline
Registered User
 
Join Date: Nov 2010
Posts: 15
linuxfirefox
Re: Broken YUM

Worked for me! Thanks @jozze
Reply With Quote
Reply

Tags
broken, yum

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
yum broken, AGAIN miles Using Fedora 3 27th September 2009 04:11 AM
FC10 Grub Install Options Broken, chroot broken, dual boot troubles cuban_cigar Using Fedora 1 6th April 2009 10:35 AM
I´ve just broken FC3...............................HELP! veronica79 Using Fedora 7 30th January 2005 10:10 PM


Current GMT-time: 04:21 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat