Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

[ Create a new account ]

Morosoph (693565)

Morosoph
  (email not shown publicly)
http://homepage.ntlworld.com/tim.wesson/

My Amigos [slashdot.org]. Your Amigos [slashdot.org]. Everyone [slashdot.org]!

Public Key [slashdot.org].

He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me.
-- Thomas Jefferson.

+2 to Offtopic [slashdot.org].

Journal of Morosoph (693565)

Problem Solved: Fixing borked RPM databases.

[ #108289 ]
Wednesday June 01 2005, @02:44PM
Bug
The Swedish Chef's been at my rpm database bork bork bork.

My question is: does anyone here know how to fix it?

I decided to attempt building TOR from source (yes, I build from source RPMs on a semi-regular basis with the advantage that I can target an athlon architecture with -O3. Gentoo? Wassat?).

My problem is that tor requires libevent, so, being lazy, I just installed it by following the README. TOR built fine, but I couldn't install it (it was depended upon libevent-1.1.so.1), so I moved libevent* from /usr/local/lib to /usr/lib to see if it would pick it up. Ouch! I think that I did some invisible damage at this point (or rather when I typed rpm -U tor*).

Okay, 'rpm -U tor*' still didn't work, so I decided to stop being lazy, move the files back and ran 'make uninstall' for libevent, and decided to build libevent using rpmbuild, as I should have done in the first place. So I grabbed the spec file, trivially editted for version numbers, copied libevent-1.1.tar.gz into ~/system/SOURCES/libevent/, and boldly typed rpmbuild -ba libevent.spec.

A few pre-compile-lines later, I got this:

error: Installed (but unpackaged) file(s) found:
/usr/lib/libevent-1.1.so.1.0.2
/usr/lib/libevent.la

[These files don't exist]. I appear to have borked my rpm database. I can't seem to get it to forget that libevent* lived in /usr/lib for a short while, and so cannot build a replacement.

Anyone else been in a similar predicament? How did you solve it?

Yes, I've done the Google search. Maybe I just need to get the search terms right...

Update: Problem solved. Database not borked, after all, although ces came up with something that could well prove useful on a future occasion...

Thank-you nizo & ces (in posting order) both for your help!

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • You could "touch" the missing files, and do a forced rpm remove: rpm --force -e packagename
    (maybe toss in a --nodeps if it complains about dependencies). I dunno if that will fix it; let me know how it goes :-)
    • But no change :-(

      I didn't expect it to work, since it wasn't an RPM that initially installed the files, but rather a standard make install and an additional move into /usr/lib.

      I've realised though that maybe I'm being 'dumb': error messages are often misleading. Maybe my RPM and source, coming from different places, simply don't match: make install, by installing in /usr/local/lib isn't putting the files where rpmbuild 'expects' it to go, and so a thoroughly misleading error message follows.

      I'm o

  • There is a command that will rebuild the package database from other files on the disk.

    I've used this before when in the situation you describe.

    Unfortunately it has been long enough that I can't remember if it is an option to the RPM command or a different command.

    You might want to try "man -k rpm" and see if it gives you anything useful.
    • rpm --rebuilddb

      Should take a while...

      I hope that it works, but at least it pretty much exhausts database corruption as a cause if it isn't this!

    • by half...

      As I suspected above [slashdot.org], the error message is a massively misleading one related to having mismatched spec and sourcefiles. The DAG source RPM [wieers.com] worked without causing any stress, and the cost of a minor version number (sacre bleu!), and I now have tor installed.

      It's a good thing that I'm a Brit; the French have laws against this [eff.org] kind [i2p.net] of thing [freenetproject.org].