linux yum 安装报错 error: rpmdb: BDB0058 page 65427994: illegal page type or format error: rpmdb: BDB0061 PANIC: Invalid argument
报错如下:
error: rpmdb: BDB0058 page 65427994: illegal page type or format error: rpmdb: BDB0061 PANIC: Invalid argument error: db5 error(-30973) from dbcursor->c_get: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: error(-30973) getting "libc.so.6(GLIBC_2.2.5)(64bit)" records from Providename index: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from dbcursor->c_close: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from db->cursor: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from db->cursor: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from db->cursor: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from db->cursor: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from db->cursor: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from db->cursor: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery --> Processing Dependency: socat for package: kubelet-1.20.9-0.x86_64 error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from db->cursor: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery --> Processing Dependency: libc.so.6(GLIBC_2.2.5)(64bit) for package: kubelet-1.20.9-0.x86_64 error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from db->cursor: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery Error: Package tuple ('glibc', 'x86_64', '0', '2.17', '307.el7.1') could not be found in rpmdb error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from db->close: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from db->close: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from db->close: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: rpmdb: BDB1581 File handles still open at environment close error: rpmdb: BDB1582 Open file handle: /var/lib/rpm/__db.001 error: rpmdb: BDB1582 Open file handle: /var/lib/rpm/__db.002 error: rpmdb: BDB1582 Open file handle: /var/lib/rpm/__db.003 error: rpmdb: BDB1582 Open file handle: /var/lib/rpm/Packages error: rpmdb: BDB1582 Open file handle: /var/lib/rpm/Name error: rpmdb: BDB1582 Open file handle: /var/lib/rpm/Providename error: rpmdb: BDB0060 PANIC: fatal region error detected; run recovery error: db5 error(-30973) from dbenv->close: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
解决办法: #删除这个几个文件,重新构建下rpm库即可
cd /var/lib/rpm;ls *db*
__db.001 __db.002 __db.003
rm -f *db*
rpm --rebuilddb