1.备份原库
tar cvzf rpmdb-backup.tar.gz /var/lib/rpm
2.删除rpmdb库
rm -f /var/lib/rpm/__db.00*
3.重建库
rpm --rebuilddb
4.检查是否正常
rpm -qa
一口气:
tar cvzf rpmdb-backup.tar.gz /var/lib/rpm rm -f /var/lib/rpm/__db.* rpm --rebuilddb rpm -qa
2023-12-27 16:10:51
1.备份原库
tar cvzf rpmdb-backup.tar.gz /var/lib/rpm
2.删除rpmdb库
rm -f /var/lib/rpm/__db.00*
3.重建库
rpm --rebuilddb
4.检查是否正常
rpm -qa
一口气:
tar cvzf rpmdb-backup.tar.gz /var/lib/rpm rm -f /var/lib/rpm/__db.* rpm --rebuilddb rpm -qa