执行yum时,报错error: rpmdb: BDB0113 Thread/process 13132/139729145776192 failed: BDB1507 Thread died in Berkeley DB library

我们再安装了腾讯云轻量云服务器的宝塔应用之后,出现无法使用yum命令的情况。注意,这里使用的是CentOS 7.8 64bit的系统,应用镜像宝塔Linux面板。原因就是rpm数据库损坏。

问题描述

[[email protected] yum.repos.d]# yum clean all
error: rpmdb: BDB0113 Thread/process 13132/139729145776192 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:

重新构建rpm数据库

[[email protected] yum.repos.d]# cd /var/lib/rpm [[email protected] rpm]# ls Basenames     __db.001  __db.003  Group       Name          Packages     Requirename  Sigmd5 Conflictname  __db.002  Dirnames  Installtid  Obsoletename  Providename  Sha1header   Triggername [[email protected] rpm]# rm -rf __db* [[email protected] rpm]# rpm --rebuilddb

腾讯云限时秒杀【点击购买】

搬瓦工,CN2高速线路,1GB带宽,电信联通优化KVM,延迟低,速度快,建站稳定,搬瓦工BandwagonHost VPS优惠码BWH26FXH3HIQ,支持<支付宝> 【点击购买】!

Vultr$3.5日本节点,512M内存/500G流量/1G带宽,电信联通优化,延迟低,速度快【点击购买】!

阿里云香港、新加坡VPS/1核/1G/25G SSD/1T流量/30M带宽/年付¥288【点击购买】