[opensuse] Help - rpm - error: no dbpath has been set - howto fix?
All, I took my trusty laptop to about 10,500 ft (in Co.), and upon return, it booted fine, I went to use yast -> network to change the wifi connection and was prompted that wpa_supplicant, etc.. were not installed -- HUH? This is an old 11.4 box, wpa_supplicant and the rest have been installed for years. So to check, I did the old 'rpm -q wpa_supplicant' and got: error: no dbpath has been set error: cannot open Packages database in /%{_dbpath} error: no dbpath has been set error: cannot open Packages database in /%{_dbpath} Decided to reboot and watch the startup as this didn't make any sense... fsck.ext3 on /dev/sda6 '/' failed and through me into recovery mode. So, in recovery mode: fsck -y /dev/sda6 Churns away for a minute or two and finds ..... blah.blah duplicate/unused inode for file.xyz delete? yes <snip> about 15 more Then fsck completes all remaining checks normally. (reboot) Open kde3, konsole, "su" "yast2 --qt" -> network settings -> same problem, yast doesn't see wpa_supplicant installed --> crud! So, 15:26 alchemy:~> rpm -qa error: no dbpath has been set error: cannot open Packages database in /%{_dbpath} error: no dbpath has been set error: cannot open Packages database in /%{_dbpath} 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. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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... -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
-----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. (This coupled with my ISP's email problem, has been a fine -- welcome back from vacation :) - -- 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/ iEYEARECAAYFAlMnHA8ACgkQZMpuZ8Cyrcg20wCfW7T8Fg3NFMEnOaEP20H7o6ov C5QAn2OqylBEiinhI/Uwo58bhS9SLZ1K =gLO1 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 В Mon, 17 Mar 2014 11:00:15 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> пишет:
-----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┼Ю
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 03/17/2014 11:11 AM, Andrey Borzenkov wrote:
В Mon, 17 Mar 2014 11:00:15 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> пишет:
-----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? N▀╖╡ФЛr╦⌡yИ ┼Z)z{.╠О╝·к⌡╠йБmЙ)z{.╠Й+│:╒{Zrшaz▄'z╥╕j)h╔ИЛ╨г╬ё ч╝┼^·к╛z┼Ю
Andrey, thanks. We are getting somewhere: [11:34 alchemy:~] # rpm --dbpath=/var/lib/rpm -qa error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm [11:35 alchemy:~] # rpm --showrc | grep dbpath {shows nothing} But: [11:36 alchemy:~] # rpm --dbpath=/var/lib/rpm --showrc | grep dbpath -8: _dbpath /var/lib/rpm Going further: [11:37 alchemy:~] # rpm -vv --dbpath=/var/lib/rpm -qa D: loading keyring from pubkeys in /%{_keyringpath}/*.key D: couldn't find any keys in /%{_keyringpath}/*.key D: loading keyring from rpmdb error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm [11:38 alchemy:~] # rpm -vv --root=/var/lib/rpm --dbpath=/var/lib/rpm -qa D: loading keyring from pubkeys in /var/lib/rpm/%{_keyringpath}/*.key D: couldn't find any keys in /var/lib/rpm/%{_keyringpath}/*.key D: loading keyring from rpmdb D: created directory(s) /var/lib/rpm/var/lib/rpm mode 0755 D: created directory(s) /var/lib/rpm/var/lib/rpm mode 0755 D: created directory(s) /var/lib/rpm/var/lib/rpm mode 0755 error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm/var/lib/rpm error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm/var/lib/rpm Some setting is completely gone -- what to try next? - -- 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/ iEYEARECAAYFAlMnJXkACgkQZMpuZ8CyrcgtXACffuGm7PcGbAXyctF0UEjklwMX 0W0Ani24wfVy8nw8k9UYSpk480NmULvl =Uklt -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 В Mon, 17 Mar 2014 11:40:25 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> пишет:
Andrey, thanks. We are getting somewhere:
[11:34 alchemy:~] # rpm --dbpath=/var/lib/rpm -qa error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm
[11:35 alchemy:~] # rpm --showrc | grep dbpath {shows nothing}
Well, looks like the most part is gone: bor@opensuse:~/src/grub> grep -r dbpath /usr/lib/rpm /usr/lib/rpm/macros:%_dbpath %{_var}/lib/rpm /usr/lib/rpm/macros:%_dbpath_rebuild %{_dbpath} /usr/lib/rpm/macros:%_keyringpath %{_dbpath}/pubkeys/ /usr/lib/rpm/macros:%_rpmlock_path %{_dbpath}/.rpm.lock You could download RPM with these files and simply extract content using rpm2cpio (or reinstall using rpm --dbpath): bor@opensuse:~/src/grub> rpm -qf /usr/lib/rpm/macros rpm-4.11.1-6.5.1.x86_64 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlMnJ2wACgkQR6LMutpd94zkXgCfeHt5uG1aczyKLFO4qyolkZfe cekAn0bpzgHDXtwJCUcW18pftFRQiFng =lh9C -----END PGP SIGNATURE-----
On 03/17/2014 12:48 PM, Andrey Borzenkov pecked at the keyboard and wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
В Mon, 17 Mar 2014 11:40:25 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> пишет:
Andrey, thanks. We are getting somewhere:
[11:34 alchemy:~] # rpm --dbpath=/var/lib/rpm -qa error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm
[11:35 alchemy:~] # rpm --showrc | grep dbpath {shows nothing}
Well, looks like the most part is gone:
bor@opensuse:~/src/grub> grep -r dbpath /usr/lib/rpm /usr/lib/rpm/macros:%_dbpath %{_var}/lib/rpm /usr/lib/rpm/macros:%_dbpath_rebuild %{_dbpath} /usr/lib/rpm/macros:%_keyringpath %{_dbpath}/pubkeys/ /usr/lib/rpm/macros:%_rpmlock_path %{_dbpath}/.rpm.lock
You could download RPM with these files and simply extract content using rpm2cpio (or reinstall using rpm --dbpath):
bor@opensuse:~/src/grub> rpm -qf /usr/lib/rpm/macros rpm-4.11.1-6.5.1.x86_64
You can also extract files from an RPM using mc. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 03/17/2014 12:05 PM, Ken Schneider - openSUSE wrote:
On 03/17/2014 12:48 PM, Andrey Borzenkov pecked at the keyboard and wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
В Mon, 17 Mar 2014 11:40:25 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> пишет:
Andrey, thanks. We are getting somewhere:
[11:34 alchemy:~] # rpm --dbpath=/var/lib/rpm -qa error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm
[11:35 alchemy:~] # rpm --showrc | grep dbpath {shows nothing}
Well, looks like the most part is gone:
bor@opensuse:~/src/grub> grep -r dbpath /usr/lib/rpm /usr/lib/rpm/macros:%_dbpath %{_var}/lib/rpm /usr/lib/rpm/macros:%_dbpath_rebuild %{_dbpath} /usr/lib/rpm/macros:%_keyringpath %{_dbpath}/pubkeys/ /usr/lib/rpm/macros:%_rpmlock_path %{_dbpath}/.rpm.lock
You could download RPM with these files and simply extract content using rpm2cpio (or reinstall using rpm --dbpath):
bor@opensuse:~/src/grub> rpm -qf /usr/lib/rpm/macros rpm-4.11.1-6.5.1.x86_64
You can also extract files from an RPM using mc.
That's what I did, and it turned out that the missing files were in /usr/lib/rpm. I extracted rpm-4.8.0-28.29.1.x86_64.rpm with rpm2cpio rpm-4.8.0-28.29.1.x86_64.rpm | cpio -idmv Then used mc to compare files in ~/tmp/rpm/usr/lib/rpm and /usr/lib/rpm and then just copied the missing files. Now: # rpm -q wpa_supplicant wpa_supplicant-0.7.3-3.4.1.x86_64 Done! This is the first time I have had fsck remove duplicate/unused inodes that were NOT duplicate or unused... I suspect there was a disc sector/cluster that went south and for whatever reason caused fsck.ext3 to read/remove the information as duplicate/unused info when if fact it wasn't. I also suspect that part of the disc had been weak for some time and the pressure/temp change from sea-level to 11,000 ft. and back probably pushed the area from readable to unreadable causing the problem. What caused the greatest confusion was that every other part of the system was working normally, except for rpm. Add one more anomaly to the experience box. Thanks Ken, Carlos, Andrey, Patrick, All for your help! -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-03-17 19:48, David C. Rankin wrote:
What caused the greatest confusion was that every other part of the system was working normally, except for rpm. Add one more anomaly to the experience box.
Well... it is possible that on most occasions, fsck removes things that are not crucial, and may go unnoticed for years.
Thanks Ken, Carlos, Andrey, Patrick, All for your help!
Welcome :-) As your hard disk is suspect, I would run the long SMART test (man smartctl). -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On 03/17/2014 02:48 PM, David C. Rankin pecked at the keyboard and wrote:
On 03/17/2014 12:05 PM, Ken Schneider - openSUSE wrote:
On 03/17/2014 12:48 PM, Andrey Borzenkov pecked at the keyboard and wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
В Mon, 17 Mar 2014 11:40:25 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> пишет:
Andrey, thanks. We are getting somewhere:
[11:34 alchemy:~] # rpm --dbpath=/var/lib/rpm -qa error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm error: dbiOpen: dbapi 1 not available error: cannot open Packages database in /var/lib/rpm
[11:35 alchemy:~] # rpm --showrc | grep dbpath {shows nothing}
Well, looks like the most part is gone:
bor@opensuse:~/src/grub> grep -r dbpath /usr/lib/rpm /usr/lib/rpm/macros:%_dbpath %{_var}/lib/rpm /usr/lib/rpm/macros:%_dbpath_rebuild %{_dbpath} /usr/lib/rpm/macros:%_keyringpath %{_dbpath}/pubkeys/ /usr/lib/rpm/macros:%_rpmlock_path %{_dbpath}/.rpm.lock
You could download RPM with these files and simply extract content using rpm2cpio (or reinstall using rpm --dbpath):
bor@opensuse:~/src/grub> rpm -qf /usr/lib/rpm/macros rpm-4.11.1-6.5.1.x86_64
You can also extract files from an RPM using mc.
You can use MC directly on the RPM file without rpm2cpio or cpio.
That's what I did, and it turned out that the missing files were in /usr/lib/rpm. I extracted rpm-4.8.0-28.29.1.x86_64.rpm with
rpm2cpio rpm-4.8.0-28.29.1.x86_64.rpm | cpio -idmv
Then used mc to compare files in ~/tmp/rpm/usr/lib/rpm and /usr/lib/rpm and then just copied the missing files. Now:
Thanks Ken, Carlos, Andrey, Patrick, All for your help!
I try to help when ever I can, although health can sometimes get in the way. :-) -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----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@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
David C. Rankin wrote:
All,
I took my trusty laptop to about 10,500 ft (in Co.),
What is "Co." ? -- Per Jessen, Zürich (16.8°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Per Jessen <per@computer.org> [03-17-14 10:13]:
David C. Rankin wrote:
All,
I took my trusty laptop to about 10,500 ft (in Co.),
What is "Co." ?
The state, Colorado. Frequently people use language abreviations and acronyms which appear familiar to them but w/o realizing that others will/may not understand :^) -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Patrick Shanahan <paka@opensuse.org> [03-17-14 10:21]:
* Per Jessen <per@computer.org> [03-17-14 10:13]:
David C. Rankin wrote:
All,
I took my trusty laptop to about 10,500 ft (in Co.),
What is "Co." ?
The state, Colorado.
Frequently people use language abreviations and acronyms which appear familiar to them but w/o realizing that others will/may not understand :^)
ps: I wondered myself until I had read the entire post. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 03/17/2014 09:22 AM, Patrick Shanahan wrote:
The state, Colorado.
Frequently people use language abreviations and acronyms which appear familiar to them but w/o realizing that others will/may not understand :^)
ps: I wondered myself until I had read the entire post.
Correct, The "Boss" advised that we were taking the children on vacation to Colorado for their spring break. I responded as any wise and experienced man would in the given situation with two words, simply -- "Yes, Dear." -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Andrey Borzenkov
-
Carlos E. R.
-
David C. Rankin
-
Ken Schneider - openSUSE
-
Patrick Shanahan
-
Per Jessen