Mailinglist Archive: opensuse (929 mails)

< Previous Next >
Re: [opensuse] Help - rpm - error: no dbpath has been set - howto fix?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/17/2014 11:00 AM, David C. Rankin wrote:
On 03/16/2014 04:34 PM, Carlos E. R. wrote:
On 2014-03-16 21:40, David C. Rankin wrote:

Ok, so apparently rpm lost a link/file that sets the dbpath so rpm doesn't
know what is installed and can't find it's cache. How do I fix this? I
haven't
messed with the actual dbpath for rpm before -- where is it set and to
what? Any
help appreciated. Thanks.

The rpm database is in "/var/lib/rpm/". In 13.1 I have:

/var/lib/rpm/
├── Basenames
├── Conflictname
├── Dirnames
├── Group
├── Installtid
├── Name
├── Obsoletename
├── Packages
├── Providename
├── Pubkeys
├── Requirename
├── Sha1header
├── Sigmd5
├── Triggername
├── alternatives/


The crucial one is "Packages", the rest can be rebuilt. If "Packages" is
missing, there are backups in "/var/adm/backup/rpmdb/". Pick the newest
file, expand it, delete the rest, and run "rpm rebuild" (check the exact
command name in man).

If it fails, pick the following older packages file, and retry till it
works...


Thanks Carlos,

This is strange, I have all the files in /var/lib/rpm:

[10:55 alchemy:~] # l /var/lib/rpm
total 198204
drwxr-xr-x 2 root root 4096 Dec 10 18:06 alternatives
-rw-r--r-- 1 root root 22122496 Feb 17 01:19 Basenames
-rw-r--r-- 1 root root 12288 Dec 12 14:48 Conflictname
-rw-r--r-- 1 root root 12300288 Feb 17 01:19 Dirnames
-rw-r--r-- 1 root root 21651456 Feb 17 01:19 Filedigests
-rw-r--r-- 1 root root 65536 Feb 17 01:19 Group
-rw-r--r-- 1 root root 131072 Feb 17 01:19 Installtid
-rw-r--r-- 1 root root 176128 Feb 17 01:19 Name
-rw-r--r-- 1 root root 86016 Feb 15 15:21 Obsoletename
-rw-r--r-- 1 root root 144883712 Feb 17 01:19 Packages
-rw-r--r-- 1 root root 5177344 Feb 17 01:19 Providename
-rw-r--r-- 1 root root 1712128 Feb 17 01:19 Provideversion
-rw-r--r-- 1 root root 12288 Jan 1 16:07 Pubkeys
-rw-r--r-- 1 root root 933888 Feb 17 01:19 Requirename
-rw-r--r-- 1 root root 569344 Feb 17 01:19 Requireversion
-rw-r--r-- 1 root root 0 Mar 9 2011 .rpm.lock
-rw-r--r-- 1 root root 323584 Feb 17 01:19 Sha1header
-rw-r--r-- 1 root root 163840 Feb 17 01:19 Sigmd5
-rw-r--r-- 1 root root 12288 Dec 12 14:48 Triggername

The lock file looks odd, but given the date, that doesn't seem like a likely
candidate. I have tried both:

rpm --initdb
rpm --rebuilddb

Both give the same failure

[10:55 alchemy:~] # rpm --rebuilddb
error: can't create transaction lock on / (Is a directory)

So it really looks like the setting that tell rpm where to look is missing or
corrupt.

(This coupled with my ISP's email problem, has been a fine -- welcome back
from
vacation :)



This link seems to indicate that a call to rpmReadConfigFGiles(NULL, NULL); is
not being made by rpm (link):

http://www.redhat.com/archives/rpm-list/2002-January/msg00366.html

It means you haven't done
rpmReadConfigFGiles(NULL, NULL);
someplace early on. rpmlib cannot be (meaningfully) used without
configuration from /usr/lib/rpm/{rpmrc,macros} ...

Where is the rpmReadConfigFGiles(NULL, NULL); done is the openSuSE setup? I've
run SuSEconfig, and that did not correct the issue. So is there a separate
config file to check? My /usr/lib/rpm is:

[11:09 alchemy:/var/lib/rpm] # l /usr/lib/rpm/
total 320
drwxr-xr-x 5 root root 4096 Mar 21 2013 .
drwxr-xr-x 138 root root 36864 Dec 10 18:05 ..
drwxr-xr-x 2 root root 4096 Mar 9 2011 gnupg
drwxr-xr-x 14 root root 4096 Apr 19 2012 platform
drwxr-xr-x 2 root root 4096 May 16 2012 suse
- -rwxr-xr-x 1 root root 2102 Apr 19 2012 brp-compress
- -rwxr-xr-x 1 root root 1290 Apr 19 2012 brp-lib64-linux
- -rwxr-xr-x 1 root root 2492 Apr 19 2012 brp-python-bytecompile
- -rwxr-xr-x 1 root root 514 Apr 19 2012 brp-strip
- -rwxr-xr-x 1 root root 682 Apr 19 2012 brp-strip-shared
- -rwxr-xr-x 1 root root 5199 Apr 19 2012 brp-symlink
- -rwxr-xr-x 1 root root 1231 Apr 19 2012 check-buildroot
- -rwxr-xr-x 1 root root 729 Apr 19 2012 check-files
- -rwxr-xr-x 1 root root 418 Apr 19 2012 check-prereqs
- -rwxr-xr-x 1 root root 1039 Apr 19 2012 check-rpaths
- -rwxr-xr-x 1 root root 5045 Apr 19 2012 check-rpaths-worker
- -rwxr-xr-x 1 root root 4265 Apr 19 2012 convertdb1
- -rwxr-xr-x 1 root root 32536 Apr 19 2012 debugedit
- -rwxr-xr-x 1 root root 309 Apr 19 2012 debuginfo.prov
- -rwxr-xr-x 1 root root 437 Apr 19 2012 desktop-file.prov
- -rwxr-xr-x 1 root root 10339 Apr 19 2012 find-debuginfo.sh
- -rwxr-xr-x 1 root root 7412 Apr 19 2012 find-lang.sh
- -rwxr-xr-x 1 root root 3808 Apr 19 2012 find-provides
- -rwxr-xr-x 1 root root 867 Apr 19 2012 find-provides.ksyms
- -rwxr-xr-x 1 root root 4552 Apr 19 2012 find-requires
- -rwxr-xr-x 1 root root 1469 Apr 19 2012 find-requires.ksyms
- -rwxr-xr-x 1 root root 418 Apr 19 2012 find-supplements
- -rwxr-xr-x 1 root root 2764 Apr 19 2012 find-supplements.ksyms
- -rw-r--r-- 1 root root 2190 Oct 29 2012 kernel-module-subpackage
- -rwxr-xr-x 1 root root 4946 Feb 18 2011 map-desktop-category.sh
- -rwxr-xr-x 1 root root 436 Feb 18 2011 mimetypes.prov
- -rwxr-xr-x 1 root root 370 Apr 19 2012 pythondeps.sh
- -rwxr-xr-x 1 root root 10992 Apr 19 2012 rpmdeps
- -rwxr-xr-x 1 root root 10616 Feb 18 2011 rpmdumpheader
- -rw-r--r-- 1 root root 8747 Apr 19 2012 rpmpopt-4.8.0
- -rw-r--r-- 1 root root 15127 Apr 19 2012 rpmrc
- -rwxr-xr-x 1 root root 2162 Apr 19 2012 rpmsort
- -rw-r--r-- 1 root root 12867 Nov 19 2010 suse_macros
- -rwxr-xr-x 1 root root 13939 Feb 18 2011 suse_update_desktop_file.sh
- -rwxr-xr-x 1 root root 807 Apr 19 2012 symset-table
- -rwxr-xr-x 1 root root 223 Apr 19 2012 sysvinitdeps.sh
- -rwxr-xr-x 1 root root 907 Apr 19 2012 tgpg

Does anyone have an old install to compare with? There is no
"/usr/lib/rpm/macros" file, but there is a link:

/usr/lib/rpm/suse/macros -> /usr/lib/rpm/suse_macros




- --
David C. Rankin, J.D.,P.E.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlMnIHYACgkQZMpuZ8CyrcgI7QCfaiWW3rEXIM9wJ6Q+hrqI2LEl
vY8An3rxIGAytzytx2qhmu0aHkt/YIxK
=q0dU
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >