RPM Community Forums

Mailing List Message of <rpm-users>

Re: _dbiapi failed when doing "rpm --initdb" on RPM 4.4.6

From: Jeff Johnson <n3npq@mac.com>
Date: Sun 17 Feb 2008 - 19:13:26 CET
Message-Id: <D86273BE-C1B3-41BB-B5F1-5DED665F3107@mac.com>

On Feb 17, 2008, at 10:56 AM, Eric MSP Veith wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> im currently doing my own distribution, it's somewhat LFS, for my  
> company's
> special needs. I had not yet the time to migrate to RPM 5, so I  
> plan to
> stick with 4.4.6 for the time beeing.
>
> So, I've started the system with a boot CD, installed everything via
> rpm2cpio at first until I got a basic system. I re-mounted /proc, /dev
> and /sys and chroot()ed to my new installation to set up the RPM  
> database.
> When running "rpm --initdb", nothing happens and the directory stays
> empty. "rpm -qa" of course then shows an error message: "Cannot open
> packages database in /var/lib/rpm".
>
> Running "rpm --initdb -vv" shows the following: "D: dbiOpen: _dbiapi
> failed"; same error message when I run "rpm -qa -vv".
>
> I've no clue what RPM tries to tell me with that. :-( Needed  
> libraries (db,
> sqlite, neon, ...) are installed, ldconfig runs without problems,  
> and any
> other program does not complain. I could even compile and install a  
> kernel.
>
> Can you give my any pointers on where to search?
>

The %_dbapi macro controls which flavor of database to use.

Here are the values
     3		use Berkeley DB
     4		use sqlite3

You are likely not reading default configuration correctly if the  
value is not defined.

Examine this output first:
    rpm --showrc | grep dbapi

73 de Jeff
Received on Sun Feb 17 19:13:38 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.