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 - 00:15:16 CEST
Message-id: <286C350A-62CD-4D4A-9D6F-F54E5F91A7D9@mac.com>

On May 27, 2009, at 5:56 PM, spam.spam.spam.spam@free.fr wrote:

>>
>> Ah, that's easy fixing.
>>
>>
> This is what the 'rpm --showrc' command say :
>
> # rpm --showrc
> ARCHITECTURE AND OS:
> build arch            : i686
> compatible build archs: i686
> build os              : Linux
> compatible build os's : linux
> install arch          : i686
> install os            : Linux
> compatible archs      : i686
> compatible os's       : Linux
> optflags              : -O2 -g
>
> MACRO DEFINITIONS:
> macrofiles            :
> //lib/rpm/macros://lib/rpm/i686-linux/macros:/etc/rpm/macros.*:/etc/ 
> rpm/macros:/etc/rpm/i686-linux/macros:~/.rpmmacros

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ is the flaw.

The "//lib/rpm/macros" is usually "/usr/lib/rpm/macros", and
the contents of that file (macros.in from build) likely sets
%_dbapi (and a whole lot more).

Examine config.log from your build and work
backwards to get the macro configuration paths correct.

You can also do
	rpm --macros /usr/lib/rpm/macros --showrc | grep dbapi
to confirm that, indeed, once the compiled in path(s) are
correct, everything else will "just work".

Note that you will likely need to untar the per-platform
macro configuration in /usr/lib/rpm as well.

This is the cpu-os-macros.tar.gz checked into CVS, and
likely at http://rpm5.org/files/* somewhere.

(aside)
I *REALLY* wish configuring RPM were simpler, but everyone wants
	"Have it your own way!"
and I don't have time to describe the foolishness of it all repeatedly.

hth

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