• 周五. 10 月 11th, 2024

    error: rpmdb: BDB0113 Thread/process 10672/140237337782336 failed:BDB1507 Thread died in Berkeley DB library…

    root

    11 月 17, 2021 #centos, #yum

    今天在学习docker课程时, 在自己的云服务器上,尝试安装docker报了以下错误

    [root@VM-0-3-centos ~]# yum remove docker \
    >                   docker-client \
    >                   docker-client-latest \
    >                   docker-common \
    >                   docker-latest \
    >                   docker-latest-logrotate \
    >                   docker-logrotate \
    >                   docker-engine
    error: rpmdb: BDB0113 Thread/process 10672/140237337782336 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    CRITICAL:yum.main:

    后台经过查询出解决方案如下:,这里记录一下,以防后续类似问题出现。虽然还不知道原理是啥。

    [root@VM-0-3-centos ~]# cd /var/lib/rpm
    [root@VM-0-3-centos rpm]# ls
    Basenames     __db.001  __db.003  Group       Name          Packages     Requirename  Sigmd5
    Conflictname  __db.002  Dirnames  Installtid  Obsoletename  Providename  Sha1header   Triggername
    [root@VM-0-3-centos rpm]# rm -rf __db*
    [root@VM-0-3-centos rpm]# rpm --rebuilddb

    root