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: Wed 27 May 2009 - 22:06:21 CEST
Message-id: <534A4529-9030-4E1B-917F-2C1635247DA3@mac.com>

On May 27, 2009, at 3:49 PM, spam.spam.spam.spam@free.fr wrote:
>
> OK so first, this is what I get with verbose mode :
>
> # rpm --rebuilddb -vv
> D: pool ts:     created size 720 limit -1 flags 0
> D: pool db:     created size 180 limit -1 flags 0
> D: dbiOpen: _dbiapi failed

Ah, that's easy fixing.

(aside)
Hmmm, the error message is wrong: "%_dbapi" is the
name of the macro. Fix todo++ ...

Verify that %_dbapi value is bogus by doing
	[jbj@fedora10 rpmdb]$ rpm --showrc | grep dbapi
	-14: _dbapi	3
	-14: _dbapi_rebuild	3
	...
The correct values are displayed above.

(aside)
Ironically, the current values for %_dbapi and %_dbapi_rebuild
make no sense whatsoever:
	3	== Berkeley DB db-4.x.y
	4	== sqlite3
but that is what is currently implemented for hysterical reasons.

You can specify macro values on the CLI as, say
	--define '_dbpai 3'
but you are likely just not reading macro configuration
for some reason, usually because paths are not compiled
in correctly.

What does
	rpm --showrc
say? It should display all the configuration macros
used by rpm, including %_dbapi.

<other derivative errors deleted. once the rpmdb is opened, these  
should "work">

73 de Jeff
Received on Wed May 27 22:06:44 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.