FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Red Knuckles Guest

    Talking Solved: rpmdb open failed

    In recent install [updated once or twice previously] of FC 6 when I try to run 'yum -y update' I get the following output:

    # yum -y update
    Loading "installonlyn" plugin
    rpmdb: PANIC: fatal region error detected; run recovery
    error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db3 - (-30977)
    error: cannot open Packages database in /var/lib/rpm
    Traceback (most recent call last):
    File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
    File "/usr/share/yum-cli/yummain.py", line 85, in main
    base.getOptionsConfig(args)
    File "/usr/share/yum-cli/cli.py", line 199, in getOptionsConfig
    errorlevel=opts.errorlevel)
    File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 125, in doConfigSetup
    self.conf = config.readMainConfig(startupconf)
    File "/usr/lib/python2.4/site-packages/yum/config.py", line 597, in readMainConfig
    vars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
    File "/usr/lib/python2.4/site-packages/yum/config.py", line 656, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
    TypeError: rpmdb open failed

    What's going on and how do I fix??? When I try to edit '/etc/yum.repos.d' as root with kwrite I get:

    The file 'file:///etc/yum.repos.d' could not be opened: it is not a normal file, it is a folder.

    That seems very wrong to me. How to edit?

    When I try '# gedit /etc/yum.repos.d' I get:

    Could not open the file /etc/yum.repos.d.

    Last edited by Red Knuckles; 5th November 2006 at 08:42 PM.

  2. #2
    Red Knuckles Guest
    Ok, I fingered out how to deal with repos in FC 6. Apparently I was used to them all being in one file but now they are in a folder and you have to edit each file seperately. ie. 'kwrite /etc/yum/repos.d/fedora-core.repo' and in my case also '/etc/yum/repos.d/fedora-extras.repo' and '/etc/yum/repos.d/fedora-updates.repo'. For some reason [WHY???] FC 6 comments out all base urls in repos by default [#] so you have to remove the # before the base urls that you wish to have enabled [enabled=1]. In my case so far that is only core, extras and update. I did that but yum still won't run and gives the same error for 'yum clean all'. At least that is what I think I learned from scanning other posts. If I'm wrong someone correct me! I still don't understand why rpmdb open failed??? Is it trying to tell me something when it mentions 'Fatal error, run database recovery' and 'rpmdb: PANIC: fatal region error detected; run recovery'? Aren't I looking for a command to recover the rpmdb? Or am I looking for a rpm command? Will keep looking...

  3. #3
    Red Knuckles Guest

    NOT Solved: rpmdb open failed

    As of my last post I had not rebooted my computer. What solved the problem was removing the '#' from the base urls in repos AND rebooting computer. Then I ran:

    # yum clean all
    Loading "installonlyn" plugin
    Cleaning up Everything
    # yum -y update
    Loading "installonlyn" plugin
    Setting up Update Process
    Setting up repositories
    core 100% |=========================| 1.1 kB 00:00
    updates 100% |=========================| 1.2 kB 00:00
    extras 100% |=========================| 1.1 kB 00:00
    Reading repository metadata in from local files
    primary.xml.gz 100% |=========================| 824 kB 00:02
    ################################################## 2242/2242
    primary.xml.gz 100% |=========================| 81 kB 00:00
    ################################################## 249/249
    primary.xml.gz 100% |=========================| 1.3 MB 00:28
    ################################################## 4027/4027
    Resolving Dependencies
    --> Populating transaction set with selected packages. Please wait.
    ---> Downloading header for kdeadmin to pack into transaction set.
    kdeadmin-3.5.5-0.1.fc6.i3 100% |=========================| 35 kB 00:00

    so it appears as if it's going to update. Looks like a long one too. Maybe I never updated my FC 6 install yet afterall...
    Last edited by Red Knuckles; 4th November 2006 at 11:52 PM. Reason: Not Solved!

  4. #4
    Red Knuckles Guest
    Quote Originally Posted by Red Knuckles
    As of my last post I had not rebooted my computer. What solved the problem was removing the '#' from the base urls in repos AND rebooting computer. Then I ran:

    # yum clean all
    Loading "installonlyn" plugin
    Cleaning up Everything
    # yum -y update
    Loading "installonlyn" plugin
    Setting up Update Process
    Setting up repositories
    core 100% |=========================| 1.1 kB 00:00
    updates 100% |=========================| 1.2 kB 00:00
    extras 100% |=========================| 1.1 kB 00:00
    Reading repository metadata in from local files
    primary.xml.gz 100% |=========================| 824 kB 00:02
    ################################################## 2242/2242
    primary.xml.gz 100% |=========================| 81 kB 00:00
    ################################################## 249/249
    primary.xml.gz 100% |=========================| 1.3 MB 00:28
    ################################################## 4027/4027
    Resolving Dependencies
    --> Populating transaction set with selected packages. Please wait.
    ---> Downloading header for kdeadmin to pack into transaction set.
    kdeadmin-3.5.5-0.1.fc6.i3 100% |=========================| 35 kB 00:00

    so it appears as if it's going to update. Looks like a long one too. Maybe I never updated my FC 6 install yet afterall...
    I spoke to soon. When I do the above yum updates a few packages and then I get I very long list like this:

    rpmdb: PANIC: fatal region error detected; run recovery
    error: db4 error(-30977) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery
    rpmdb: PANIC: fatal region error detected; run recovery
    error: db4 error(-30977) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery
    rpmdb: PANIC: fatal region error detected; run recovery
    error: db4 error(-30977) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery
    rpmdb: PANIC: fatal region error detected; run recovery
    error: db4 error(-30977) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery
    rpmdb: PANIC: fatal region error detected; run recovery
    error: db4 error(-30977) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery
    rpmdb: PANIC: fatal region error detected; run recovery
    error: db4 error(-30977) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery
    rpmdb: PANIC: fatal region error detected; run recovery
    error: db4 error(-30977) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery
    rpmdb: PANIC: fatal region error detected; run recovery
    error: db4 error(-30977) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery
    rpmdb: PANIC: fatal region error detected; run recovery


    and I'm back to 'rpmdb open failed'. Then I reboot and do it again and it updates a few more packages and the same error again. How to fix? I thought that when yum was updating it was accessing repos over the internet. I'm confused as to where the error is. For what it's worth:

    # ls /var/lib/rpm
    Basenames __db.000 __db.002 Dirnames Group Name Providename Pubkeys Requireversion Sigmd5
    Conflictname __db.001 __db.003 Filemd5s Installtid Packages Provideversion Requirename Sha1header Triggername

  5. #5
    Red Knuckles Guest
    Is it possible that the repos themselves are the problem? These are the 3 I have enabled:

    [core]
    name=Fedora Core $releasever - $basearch
    baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
    mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-$releasever&arch=$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

    [extras]
    name=Fedora Extras $releasever - $basearch
    baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
    mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-$releasever&arch=$basearch
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
    gpgcheck=1

    [updates]
    name=Fedora Core $releasever - $basearch - Updates
    baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
    mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-fc$releasever&arch=$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

  6. #6
    timdsmith Guest
    No need to reinstall. Do this.
    Code:
    rm /var/lib/rpm __db.*
    Note there are two underscores before the db. You also have to run that command as root.

  7. #7
    Join Date
    Jul 2005
    Location
    Wine Country, California
    Posts
    2,850
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also as a note, Base urls are always commented out in favor of the mirrors. The mirrors spread the load.

    Speaking of load, if you get yum working and then suddenly get "can't find valid baseurl" it could be because the mirrors are overloaded (or down for maintainance) and you can uncomment the baseurl line(s) but it's advised to recomment them when done (or when mirrors are back up).

    After you rm the db, you may need to rebuild it, I believe it is rpm --rebuilddb (check man rpm to be sure)
    Mark N.

    Perpetual Newbie
    --
    I wanted to proclaim myself "The Typo King" but there's way too much competion. :p

    411874 Get Counted

  8. #8
    Red Knuckles Guest
    Quote Originally Posted by timdsmith
    No need to reinstall. Do this.
    Code:
    rm /var/lib/rpm __db.*
    Note there are two underscores before the db. You also have to run that command as root.
    I did that and:

    # rm /var/lib/rpm __db.*
    rm: cannot remove directory `/var/lib/rpm': Is a directory
    rm: cannot lstat `__db.*': No such file or directory
    # rm /var/lib/rpm__db.*
    rm: cannot lstat `/var/lib/rpm__db.*': No such file or directory

  9. #9
    Join Date
    Jul 2005
    Location
    Wine Country, California
    Posts
    2,850
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't know if this has anything to do with your problem, but I just loaded your mirrors into FF and got # no repository available for repo extras (same for updates and core).
    I get a 404 when I load my mirrors, (but yum still runs fine and finds my mirrors). I am not running FC6, but I don't have a ? in my mirror urls

    I do know I have browsed mirrors before (it's just a big list of mirrors that yum uses and rotates).
    I don't know why they are not at the moment browsable?
    Mark N.

    Perpetual Newbie
    --
    I wanted to proclaim myself "The Typo King" but there's way too much competion. :p

    411874 Get Counted

  10. #10
    Join Date
    Jul 2005
    Location
    Wine Country, California
    Posts
    2,850
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe that was supposed to be # rm /var/lib/rpm/__db.* (but I'm not sure you want to remove all of them. I thought it was just --000.db
    I could very well be wrong.
    If timdsmith could confirm???
    Mark N.

    Perpetual Newbie
    --
    I wanted to proclaim myself "The Typo King" but there's way too much competion. :p

    411874 Get Counted

  11. #11
    timdsmith Guest
    Yes. You do have to remove them all. And yes, it was supposed to be
    Code:
    rm /var/lib/rpm/__db*
    Sorry. Typo on my part. and you also have to rebuild the database. Forgot that part too. That's a shame since I just had to do this on my box yesterday. Must be getting old.
    Code:
    rpm --rebuilddb
    is the command for that.

  12. #12
    Join Date
    Jul 2005
    Location
    Wine Country, California
    Posts
    2,850
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, if it was baseball, you'd be batting 333.
    Besides, you should see some of the mistakes I've made here lately. And the fog just keeps getting denser. (Is that a word?)
    Mark N.

    Perpetual Newbie
    --
    I wanted to proclaim myself "The Typo King" but there's way too much competion. :p

    411874 Get Counted

  13. #13
    timdsmith Guest
    Quote Originally Posted by u-noneinc-s
    Hey, if it was baseball, you'd be batting 333.
    Hey!!! 333 ain't bad!!

  14. #14
    Red Knuckles Guest

    Talking Solved!

    Quote Originally Posted by timdsmith
    Yes. You do have to remove them all. And yes, it was supposed to be
    Code:
    rm /var/lib/rpm/__db*
    Sorry. Typo on my part. and you also have to rebuild the database. Forgot that part too. That's a shame since I just had to do this on my box yesterday. Must be getting old.
    Code:
    rpm --rebuilddb
    is the command for that.
    I got the solution to this problem from 2 different forums. I replaced the # sign in front of the 3 base urls where I had removed them. Also corrected the 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY'
    line to read
    'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora'
    in the 'core' repos.

    Then I ran:

    # rm /var/lib/rpm/__db*
    # rpm --rebuilddb
    # yum -y update

    and it updated 29 packages without error or warning. Thanks Lenard [LinuxQuestions.org]. Thanks timdsmith [Fedora Forum].

  15. #15
    Join Date
    Apr 2006
    Location
    Algeria
    Posts
    828
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Red Knuckles
    I got the solution to this problem from 2 different forums. I replaced the # sign in front of the 3 base urls where I had removed them. Also corrected the 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY'
    line to read
    'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora'
    in the 'core' repos.

    Then I ran:

    # rm /var/lib/rpm/__db*
    # rpm --rebuilddb
    # yum -y update

    and it updated 29 packages without error or warning. Thanks Lenard [LinuxQuestions.org]. Thanks timdsmith [Fedora Forum].

    Hy

    i've got the same problem, could you please give the exact path of the
    " I replaced the # sign in front of the 3 base urls where I had removed them. Also corrected the 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY'
    line to read
    'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora'
    in the 'core' repos."


    I mean where is it the #sign.... and gpgkey=...........

    Well in other words where should i go
    cd /etc.....???

    thanks

    i am really waiting for your answer, because i've got the same problem 100%

    thanks again

    red

Page 1 of 2 12 LastLast

Similar Threads

  1. Yum: exceptions.TypeError since last update
    By awhb in forum Using Fedora
    Replies: 0
    Last Post: 16th March 2009, 05:30 PM
  2. rpmdb open failed
    By asulwer in forum Using Fedora
    Replies: 2
    Last Post: 24th March 2007, 08:20 PM
  3. rpmdb open failed
    By Plossl in forum Using Fedora
    Replies: 2
    Last Post: 13th January 2007, 03:17 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •