Mailinglist Archive: opensuse (929 mails)

< Previous Next >
Re: SOLVED Re: [opensuse] Help - rpm - error: no dbpath has been set - howto fix?
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@xxxxxxxxxxxxxxxxxx> пишет:


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@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >