a fatel error occured could not open rpm db() [SOLVED]

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

a fatel error occured could not open rpm db() [SOLVED]

Postby mtwilson » Apr 2nd, '16, 14:42

I am new to Mageia and a relative Linux noob as well. I have Mageia 5 installed as a virtual machine with VMware on an iMac running OS 10.10.5. I have been playing around in regular user mode just looking at the directories and such and working on my CLI skills, then I went to look at the software GUI updater and got this message - a fatel error occured could not open rpm db() /usr/lib/perl5/vendor_perl/5.20.1/Rpmdrake/open.db.pm line 74...

So I went to that directory and opened the file and here is where I think the error is;

Code: Select all
sub open_rpm_db {
    my ($o_force) = @_;
    my $host;
    log::explanations("opening the RPM database");
    if ($::rpmdrake_options{parallel} && ((undef, $host) = @{$::rpmdrake_options{parallel}})) {
        state $done;
        my $dblocation = "/var/cache/urpmi/distantdb/$host";
        if (!$done || $o_force) {
            print "syncing db from $host to $dblocation...";
            mkdir_p "$dblocation/var/lib/rpm";
            system "rsync -Sauz -e ssh $host:/var/lib/rpm/ $dblocation/var/lib/rpm";
            $? == 0 or die "Couldn't sync db from $host to $dblocation";
            $done = 1;
            print "done.\n";
        }
        URPM::DB::open($dblocation) or die "Couldn't open RPM DB";
    } else {
        my $db;
        if ($::env) {
            #- URPM has same methods as URPM::DB and empty URPM will be seen as empty URPM::DB.
            $db = new URPM;
            $db->parse_synthesis("$::env/rpmdb.cz");
        } else {
            $db = URPM::DB::open($::rpmdrake_options{'rpm-root'}[0]);
        }
        $db or die "Couldn't open RPM DB (" . ($::env ? "$::env/rpmdb.cz" : $::rpmdrake_options{'rpm-roo
t'}[0]) . ")";
    }
}

I have searched around and it looks like I may need to re-install or update the rpm.db but I have not found anything that is specific to Mageia yet so I thought I would look for help from the community. I also search this forum and Mageia support before posting this and found nothing related.

I would appreciate any help or advice. BTW, this is a clean install from an iso downloaded yesterday from Mageia directly. Thanks in advance!
Last edited by mtwilson on Apr 2nd, '16, 20:40, edited 2 times in total.
mtwilson
 
Posts: 5
Joined: Apr 2nd, '16, 14:28

Re: a fatel error occured could not open rpm db()

Postby doktor5000 » Apr 2nd, '16, 15:30

When posting code or log excerpts or some output, please next time use code tags as explained in ftp://ftp5.gwdg.de/pub/linux/mandriva/m ... e_tags.ogv

mtwilson wrote:I have searched around and it looks like I may need to re-install or update the rpm.db but I have not found anything that is specific to Mageia yet so I thought I would look for help from the community.


Yes - the problem is not the code you listed, but that your rpm database is borked. To fix it, as root run
Code: Select all
rm -f /var/lib/rpm/__db*
rpm --rebuilddb
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: a fatel error occured could not open rpm db()

Postby mtwilson » Apr 2nd, '16, 18:45

Thanks for the help. The rebuild worked great! I will follow your tip on code posts in the future. Thanks again for the hand holding ;)
mtwilson
 
Posts: 5
Joined: Apr 2nd, '16, 14:28

Re: a fatel error occured could not open rpm db() [SOLVED]

Postby mhausle » Jul 30th, '16, 09:19

Thanks too! :P
mhausle
 
Posts: 3
Joined: Apr 12th, '14, 12:51

Re: a fatel error occured could not open rpm db() [SOLVED]

Postby wintpe » Aug 3rd, '16, 12:23

its odd that you had this issue, i too saw this issue on my mga5 workstation.
i found the solution, from google, but is there a problem, with the updater.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: a fatel error occured could not open rpm db() [SOLVED]

Postby ximoberna » Jun 28th, '17, 18:14

I've had a problem with rpm.db after an energy cut while updating kernel...

The same solution solved all my problems and got the updates running.
ximoberna
 
Posts: 1
Joined: Jul 31st, '12, 14:38


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron