Hello all RPM gurus,
I downloaded some official Fedora 3 update packages with yum and noticed that RPM process is stuck (it was there for whole day and ate all CPU). I killed it off and tried to continue updating system, but it seems RPM won't do anything anymore.
I've tried to remove __db* files from /var/lib/rpm/ and rebuild RPM database, but that didn't do anything. /var/lib/rpm/ contains still files and what I can tell with e.g. 'strings Basenames' there is still package related information inside.
Other than this RPM related problem, my system works normally, I just can't add or remove RPM packages. Compiling from source is though always option... NOT. ;-)
Code:
rpm --version
RPM version 4.3.2
uname -s -r -v
Linux 2.6.9-1.678_FC3 #1 Mon Nov 15 18:28:07 EST 2004
Few examples (run with root shell):
This outputs nothing:
Code:
dogville:~# rpm -qa
But for example rpm -qip works normally, RPM displays package information.
More accurate information:
Code:
dogville:~# rpm -v -v -qa
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
This recreates __db* files but won't fix the system. I have had broken RPM 3.2 database when I used RH9 and this fixed it. Also removing __db* files and rebuilding DB seems to be only instruction what I have found on the net with Googling.
Code:
dogville:~# rpm -v -v --rebuilddb
D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.32679
D: creating directory /var/lib/rpmrebuilddb.32679
D: opening old database with dbapi 3
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening new database with dbapi 3
D: opening db environment /var/lib/rpmrebuilddb.32679/Packages create:mpool
D: opening db index /var/lib/rpmrebuilddb.32679/Packages create mode=0x42
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: closed db index /var/lib/rpmrebuilddb.32679/Packages
D: closed db environment /var/lib/rpmrebuilddb.32679/Packages
D: removing directory /var/lib/rpmrebuilddb.32679
And of course I can't install new packages as there are missing dependencies because RPM can't find *any* installed packages:
Code:
dogville:/home/jamo/MyDownloads# rpm -ivh jdk-1_5_0-rc-linux-i586.rpm
error: Failed dependencies:
glibc >= 2.1.2-11 is needed by jdk-1.5.0-rc.i586
sh-utils >= 2.0-1 is needed by jdk-1.5.0-rc.i586
fileutils >= 4.0-8 is needed by jdk-1.5.0-rc.i586
gawk >= 3.0.4-1 is needed by jdk-1.5.0-rc.i586
textutils >= 2.0-2 is needed by jdk-1.5.0-rc.i586
/bin/sh is needed by jdk-1.5.0-rc.i586
/var/lib/rpm looks like this:
Code:
ls -la /var/lib/rpm/*
-rw-r--r-- 1 rpm rpm 10608640 Jan 20 03:06 /var/lib/rpm/Basenames
-rw-r--r-- 1 rpm rpm 12288 Dec 31 11:57 /var/lib/rpm/Conflictname
-rw-r--r-- 1 root root 16384 Feb 15 03:46 /var/lib/rpm/__db.001
-rw-r--r-- 1 root root 1318912 Feb 15 03:46 /var/lib/rpm/__db.002
-rw-r--r-- 1 root root 901120 Feb 15 03:46 /var/lib/rpm/__db.003
-rw-r--r-- 1 rpm rpm 3141632 Jan 20 03:06 /var/lib/rpm/Dirnames
-rw-r--r-- 1 rpm rpm 10510336 Jan 20 03:06 /var/lib/rpm/Filemd5s
-rw-r--r-- 1 rpm rpm 24576 Jan 20 03:06 /var/lib/rpm/Group
-rw-r--r-- 1 rpm rpm 20480 Jan 20 03:06 /var/lib/rpm/Installtid
-rw-r--r-- 1 rpm rpm 45056 Jan 20 03:06 /var/lib/rpm/Name
-rw-r--r-- 1 rpm rpm 12288 Jan 26 21:39 /var/lib/rpm/Packages
-rw-r--r-- 1 rpm rpm 339968 Jan 20 03:06 /var/lib/rpm/Providename
-rw-r--r-- 1 rpm rpm 110592 Jan 20 03:06 /var/lib/rpm/Provideversion
-rw-r--r-- 1 rpm rpm 12288 Dec 31 11:57 /var/lib/rpm/Pubkeys
-rw-r--r-- 1 rpm rpm 385024 Jan 20 03:06 /var/lib/rpm/Requirename
-rw-r--r-- 1 rpm rpm 180224 Jan 20 03:06 /var/lib/rpm/Requireversion
-rw-r--r-- 1 rpm rpm 94208 Jan 20 03:06 /var/lib/rpm/Sha1header
-rw-r--r-- 1 rpm rpm 49152 Jan 20 03:06 /var/lib/rpm/Sigmd5
-rw-r--r-- 1 rpm rpm 12288 Jan 20 03:06 /var/lib/rpm/Triggername
Any help would be appreciated. If I can't resolve this, I have to reinstall FC3 from scratch to be able to install new progs... compiling from source isn't for my taste and that's why we need package management! Reinstalling is though a pain because I have large disks full of stuff and I have kept this system since RedHat9 (updates to FC1, FC2 and to FC3 went quite smoothly). Any ideas?