Reputation: 336
I am trying to execute command yum search livy and getting following error:
CRITICAL:yum.main:
Error: rpmdb failed release provides. Try: rpm --rebuilddb
I tried below steps to resolve the error:
rm -f /var/lib/rpm/__db*
db_verify /var/lib/rpm/Packages
rpm --rebuilddb
All the above commands are running successfully, but when I run yum command after this, I am receiving the same error.
Upvotes: 2
Views: 6083
Reputation: 46
Probably a little late for you but it might help, ran into the same issue today.
Other that a reinstall of the system I didn't find anything useful, here's what I did (I have TSM as backup solution):
I did a restore of the files in /var/lib/rpm from 2 days ago:
mkdir rpmstuff
dsmc restore -pitd=05/03/2020 "/var/lib/rpm/*" "/root/rpmstuff/"
Be sure to kill of any processes if they are running:
ps -ef | grep 'rpm\|yum'
kill -9 pid
Remove the files that are currently in the directory, hidden ones also:
cd /var/lib/rpm
rm -rf *
\rm .dbenv.lock .rpm.lock
Copy the recovered files:
cp -av /root/rpmstuff/rpm/* .
Then:
\rm -rf __db.00*
rpm --rebuilddb
yum clean all
yum repolist
Worked for me, hope it helps.
Have a good one!
Upvotes: 2