My RPM database is shot, neither rpm or yum works. Supposedly "rpm --rebuilddb" will fix it, but it doesn't in my case. This server has three sister servers that are basically identical, and have working RPM databases. I tried copying /var/lib/rpm/ from working server to the sick one, but that didn't fix it. Any ideas of how I can use good server's rpm to fix the sick one?
Try removing /var/lib/rpm/__db.* before doing an rpm --rebuilddb.
That didn't work for me. After some googling, I tried this:
rm /dev/urandom mknod -m 644 /dev/urandom c 1 9
After that, rpm --rebuilddb did work. Unfortunately, I don't know what happened to my /dev/uraqndom. :(
rm /dev/urandom ;mknod -m 644 /dev/urandom c 1 9
works for me as well