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 - 20:01:28 CEST
Message-id: <689349EE-F3B2-4950-B5D6-A3375183B676@mac.com>

On May 28, 2009, at 1:51 PM, spam.spam.spam.spam@free.fr wrote:

>
> # rpm --nodeps -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: failed to open /etc/mtab: No such file or directory
> error: %post(8Kingdoms-1.1.0-6.fc9.i386) scriptlet failed, exit  
> status 255
>

All that rpm "knows" about the script is the exit code: 255.

This will display the scripts:
	rpm -qp --scripts 8Kingdoms-1.1.0-6.fc9.i386.rpm

And adding --nopost (or more crudely --noscripts) will
disable executing the script.

(my guess) In a chroot, with --nodeps, you likely don't
have necessary prerequisites installed for the %post
script to run.

> So there is some errors as you can see but it in installed!
> I see the files /usr/bin/8Kingdoms
>

Yes. RPM installs before %post is attempted.

> nice wrok :)
>
> The /etc/mtab error is normal... I am in a chrooted directory and no  
> partition
> table is available...
>
> But the second error, I never seen it before :
> error: %post(8Kingdoms-1.1.0-6.fc9.i386) scriptlet failed, exit  
> status 255
>

Look in /var/tmp (or however you have configgered %_tmpdir)
and you will likely see the script that was attempted.

You will see something like
	/var/tmp/rpm-tmp.123456
That is the scriptlet that was attempted.

Running that script outside of RPM in a sufficiently similar context
will fail in exactly the same way: exit status was 255.

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