RPM Community Forums

Mailing List Message of <rpm-users>

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

From: <spam.spam.spam.spam@free.fr>
Date: Thu 28 May 2009 - 21:09:16 CEST
Message-ID: <1243537756.4a1ee15c28274@imp.free.fr>
Selon Jeff Johnson <n3npq@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
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
>


1)I don't see this tmp file... My tmp/var/tmp/ folder is completly empty.
I try to find my tmpdir :
#rpm --showrc | grep tmpdir
-14: __dbi_other        %{?_tmppath:tmpdir=%{_tmppath}} %{?__dbi_cdb}
-14: __dbi_sqlconfig_current    perms=0644 %{?_tmppath:tmpdir=%{_tmppath}}
-14: tmpdir     %{_tmppath}
But I am not sure to understand. Where is it?

2)A strange thing is when I try to install a second time the RPM package :

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
bash-4.0# 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: ^(?:([^:-]+):)?([^:-]+)(?:-([^:-]+))?(?::([^:-]+))?$: regcomp failed:
Invalid preceding regular expression
Segmentation fault

You can see now it absolutely wants I install libpcre (there is regularg
expression error because it dosen't find libpcre which is not installed for the
moment...). I tell --nodeps... But it wants to use libpcre.
Why ONLY the second time I try to install, I see the error about regular
expression?
Received on Thu May 28 21:09:40 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.