Bug 29089

Summary: rpm/urpmi installation fails with error: cannot open Packages index using bdb_ro - Operation not permitted (1)"
Product: Mageia Reporter: Ethan Merritt <sfeam>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED INVALID QA Contact:
Severity: major    
Priority: Normal CC: davidwhodgins
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:

Description Ethan Merritt 2021-06-06 23:46:52 CEST
Description of problem:

After running "urpmi --auto-update" or attempted "rpm -Ui" on any of the new rpms that it obtains, installation fails with the following messages:

warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
error: cannot open Packages index using bdb_ro - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm

How can I recover from this? Downgrading doesn't seem possible because rpm is basically refusing to install anything.   
Version-Release number of selected component (if applicable):

# rpm -qi rpm
warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
Name        : rpm
Epoch       : 1
Version     : 4.16.90
Release     : 0.git15395.2.mga9
Architecture: x86_64
Install Date: Sun 06 Jun 2021 02:18:50 PM PDT



How reproducible: 100%


Steps to Reproduce:
1. urpmi --auto-update
2.
3.
Comment 1 Dave Hodgins 2021-06-07 00:41:04 CEST
See https://ml.mageia.org/l/arc/dev/2021-06/msg00037.html

Cauldron users should monitor the dev mailing list.

Status: NEW => RESOLVED
CC: (none) => davidwhodgins
Resolution: (none) => INVALID

Comment 2 Ethan Merritt 2021-06-07 04:41:31 CEST
Thanks!

Actually the needed command turns out to be "rpmdb --rebuilddb" rather than what is shown in that message, but the hint was sufficient.