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 - 17:46:21 CEST
Message-ID: <1243525581.4a1eb1cd18626@imp.free.fr>
Selon Jeff Johnson <n3npq@mac.com>:

>
> >
> >
> > I have written in the previous mail (see up):
> > 'error: unpacking of archive failed: cpio: Bad magic'
> > This is an error I get. And that's the reason why I thought I need
> > CPIO. But
> > CPIO isn't mandatory, so... Why this error?
>
> (aside)
> MANDATORY (of course) depends on a context, and there are
> different contexts of reference.
>
> wrto cpio, the usage case for cpio in RPM is payload extraction using
> rpm2cpio
> (or rpm2cpio.sh) as in
> 	rpm2cpio foo*.rpm | cpio -dim
> RPM itself doesn't need that functionality, but your Slackware chroot
> might
> benefit from being able to extract files from *.rpm packages without
> using RPM.
>
> Dunno what the failure is.
>
> The magic check is attempted when the payload is first opened.
>
> A failure is typically from truncated *.rpm input or (likelier
> in your case) rpm being mis-built. Check what compressions
> you have built into RPM.
>
> Doing
> 	rpm2cpio foo*.rpm | cpio -dim
> is one easy test of the payload extraction.
>
> There's also "-vv --fsmdebug" options that will display
> diagnostic information regrading payload unpacking.
> Likely --fsmdebug won't help with "bad magic", all you
> will see is that, indeed, the magic is bad.
>
> There are some small toy *.rpm's that are in RPM cvs (
> see the tests/ subdirectory) that can be used for simple
> installs.
>
> The tests/devtool-sanity-1.0-1.src.rpm package in particular
> can be built and an install attempted to diagnose your problem.
>
> 73 de Jeff
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
>


Ok so, you think I should check what compressions I have built into RPM. Do you
speak about the 8Kingdoms-1.1.0-6.fc9.i386.rpm RPM package or the rpm5 software?

The configure options I have chosen :

./configure --without-path-versioned --without-db-tools-integrated
--without-db-rpc --without-db-largefile --without-python --without-perl
--without-selinux --without-libelf --without-pthread --without-libintl-prefix
--without-libiconv-prefix --without-gnu-ld --without-apidocs --without-pic
--disable-largefile --disable-rpath --disable-nls --disable-broken-chown
--disable-build-lafiles --disable-build-maxextlibdep --disable-build-extlibdep
--disable-build-intlibdep --disable-build-versionscript --disable-build-static
--disable-build-gcov --disable-build-pie --disable-build-pic
--disable-libtool-lock --disable-dependency-tracking --disable-maintainer-mode
--disable-build-warnings --disable-build-debug --with-popt --without-zlib
--without-bzip2 --without-xz --with-beecrypt --without-nss --without-openssl
--without-neon --without-file --with-db --without-sqlite --without-lua
--without-pcre -without-uuid --without-syck --without-xar --without-dmalloc
--without-efence --without-keyutils --prefix=/

How to know the compressions that have been built into RPM?
Received on Thu May 28 17:46:45 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.