RPM: error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
RPM: error: cannot open Packages index using db5 – (-30969)
RPM: error: cannot open Packages database in /var/lib/rpm
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing ‘dnf clean packages’.
解决:删除rpm管理数据库,然后重建。步骤如下:
1、cd 到目录“/var/lib/rpm”,确定数据库列表和名称:
root# cd /var/lib/rpm
root# ls -a
2、删除“__db.001”、“__db.002”和“__db.003”:
root# rm -rf __db.*
3、重建:
root# rpm --rebuilddb
4、这样就可以更新了:
root# dnf update