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

В Mon, 17 Mar 2014 11:00:15 -0500
"David C. Rankin" <drankinatty@xxxxxxxxxxxxxxxxxx> пишет:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.


Try "rpm --dbpath /var/lib/rpm" - does it work? What "rpm --showrc |
grep dbpath" shows?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlMnHtAACgkQR6LMutpd94x3mACfegCTa0k5vGZ+TATTTDASyXUt
aH0AnAnjQOT0NBX7AmdKsMBgnF6dGtAt
=2swE
-----END PGP SIGNATURE-----
N▀╖╡ФЛr╦⌡yИ ┼Z)z{.╠О╝·к⌡╠йБmЙ)z{.╠Й+│:╒{Zrшaz▄'z╥╕j)h╔ИЛ╨г╬ё ч╝┼^·к╛z┼Ю
< Previous Next >
Follow Ups