RPM Community Forums

Mailing List Message of <rpm-users>

Re: error: cannot open Packages database in /var/lib/rpm

From: Jeff Johnson <n3npq@mac.com>
Date: Thu 28 May 2009 - 03:02:01 CEST
Message-id: <44E9C2BD-16E2-4AA6-A7CA-9D9CA83A5417@mac.com>

On May 27, 2009, at 6:34 PM, spam.spam.spam.spam@free.fr wrote:
> And now If I do :
> # rpm --macros /lib/rpm/macros --rebuilddb
> Freeing read locks for locker 0x1: 27931/3079952080
> Freeing read locks for locker 0x3: 27931/3079952080
> Freeing read locks for locker 0x4: 27931/3079952080
> Freeing read locks for locker 0x5: 27931/3079952080

You will see this every time rpm exits abnormally,
in this case a segfault.

Good. That largely confirms that Berkeley DB is functional.

> It works !
> I see files into /var/lib/rpm :
> Basenames  Packages  Providename  Pubkeys  __db.001  __db.002  __db. 
> 003
> __db.004
> But I can't install a package :
> rpm --macros /lib/rpm/macros -i 8Kingdoms-1.1.0-6.fc9.i386.rpm
> warning: 8Kingdoms-1.1.0-6.fc9.i386.rpm: Header V3 DSA signature:  
> NOKEY, key ID
> 4ebfc273
> error: ^(?:([^:-]+):)?([^:-]+)(?:-([^:-]+))?(?::([^:-]+))?$: regcomp  
> failed:
> Invalid preceding regular expression

All package dependencies are parsed using libpcre.

You are failing to compile the pattern used to parse
dependency E:V-R into pieces for comparison. The segfault
is derivative from the failure to compile the PCRE pattern.

Which likely means that rpm is misbuilt.

What platform are you using? RPM needs either a patched
regex emulation if the external "system" library was
used for -lpcre, or needs to be built with the internal
PCRE libraray (which has the patch applied).

The patch renames regex(3) emulation symbols, is commonly used
on Debian and PLD, is not used with RHEL/Fedora derived systems.

Likely easiest fix is to configure the RPM build using

But you can also add --nodeps to disable dependency checking
if you just want to see some package install.

Again add -vv to see what is happening, or where an install is failing.

73 de Jeff
Received on Thu May 28 03:02:38 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.