使用yum时用Ctrl+C强制终止出现的Error: rpmdb open failed解决方案

刚才为了写有关yum的博客,我在我的CentOS7操作系统使用yum -h想把里边的信息复制出来整理一下大家讲一下yum的具体操作,由于我不小心把yum -h里边的内容给复制到shell命令行了,这下子倒霉了,不断的有yum …… 的命令出现,于是我不断使用ctrl+C快捷键进行命令终止操作,当所有操作都终止了,以下问题出现了:

[[email protected] ~]# yum clean all

error: rpmdb: BDB0113 Thread/process 58171/139859184105280 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:

Error: rpmdb open failed

[[email protected] ~]# yum grouplist

error: rpmdb: BDB0113 Thread/process 58171/139859184105280 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:

Error: rpmdb open failed

[[email protected] ~]# yum --help

error: rpmdb: BDB0113 Thread/process 58171/139859184105280 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:

Error: rpmdb open failed

以上所有用到yum的操作都有一个同样的问题那就是:

error: rpmdb: BDB0113 Thread/process 58171/139859184105280 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:

Error: rpmdb open failed

2、根据提示我们可以知道rpm数据库在yum安装过程中使用Ctrl+C给损坏了,需要我们重新构建,下面是重新构建的方法及步骤:

[[email protected] Packages]# 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 __db.* -rf                #删除rpm库

[[email protected] rpm]# rpm --rebuilddb              #rpm的重新构建命令

[[email protected] rpm]# yum clean all                #用yum clean all重新测试

Loaded plugins: fastestmirror, langpacks

Cleaning repos: c7-media

Cleaning up everything

Cleaning up list of fastest mirrors

[[email protected] rpm]# yum grouplist                #用yum grouplist 命令重新测试

Loaded plugins: fastestmirror, langpacks

c7-media                                                                                                                | 3.6 kB  00:00:00

(1/2): c7-media/group_gz                                                                                                | 155 kB  00:00:00

(2/2): c7-media/primary_db                                                                                              | 2.8 MB  00:00:00

Determining fastest mirrors

Installed Environment Groups:

Server with GUI

Available Environment Groups:

Minimal Install

Compute Node

Infrastructure Server

File and Print Server

Basic Web Server

Virtualization Host

GNOME Desktop

KDE Plasma Workspaces

Development and Creative Workstation

Installed Groups:

Compatibility Libraries

Development Tools

Available Groups:

Console Internet Tools

Graphical Administration Tools

Legacy UNIX Compatibility

Scientific Support

Security Tools

Smart Card Support

System Administration Tools

System Management

Done

OK,成功了,问题解决了。

时间: 2024-10-23 03:15:41

使用yum时用Ctrl+C强制终止出现的Error: rpmdb open failed解决方案的相关文章

使用yum时出现Error: rpmdb open failed解决方案

一.问题描述 使用yum安装软件时出现Error: rpmdb open failed,报错信息显示rpm数据库被损坏. 二.解决方案 重建rpm数据库. [[email protected] yum.repos.d]# cd /var/lib/rpm [[email protected] rpm]# lsBasenames __db.001 __db.003 Group Name Packages Requirename Sigmd5Conflictname __db.002 Dirnames

使用yum时提示Error: rpmdb open failed

使用yum安装时提示如下报错: rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30974) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db3 -  (-30974) error: cannot open Packages

使用yum提示Error: rpmdb open failed的解决方案

使用yum或者rpm安装包时出现问题,安装时报出大约如下错误: rpmdb: Thread/process 35884/139793484506880 failed: Thread died in Berkeley DB library error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index 

关于YUM错误,Error: rpmdb open failed

错误如题: 1 rpmdb: Thread/process 16216/140121371674368 failed: Thread died in Berkeley DB library 2 error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery 3 error: cannot open Packages index using db3 - (-30974)

YUM报错解决:rpmdb open failed

yum安装某个软件的时候,出现报错 [[email protected] ~]# yum install -y zabbix-agent rpmdb: unable to join the environment error: db3 error(11) from dbenv->open: Resource temporarily unavailable error: cannot open Packages index using db3 - Resource temporarily unav

CentOS yum时出现“Could not retrieve mirrorlist ”的解决办法——resolv.conf的配置

原因:没有配置resolv.conf 解决方法: 到/etc目录下配置resolv.conf加入nameserver IP,如: nameserver 8.8.8.8 nameserver 8.8.4.4 search localdomain 保存再次运行上面命令就可以. 关键一点  serach那一行要在nameserver的后面 CentOS yum时出现"Could not retrieve mirrorlist "的解决办法--resolv.conf的配置,布布扣,bubuko

centos6.6下安装MySQLdb时出现“error: command 'gcc' failed with exit status 1”

1. 问题描述 在MySQL-python-1.2.3源码包根目录下执行安装命令: # python setup.py install 出现以下信息: error: command 'gcc' failed with exit status 1 2. 解决方法 在安装MySQLdb前安装以下依赖库: # yum install python-devel mysql-devel zlib-devel openssl-devel 安装完以上依赖库后, 再在MySQL-python-1.2.3源码包根

nodejs:注册登录session出错以及连接Mongodb数据库时Error connecting to database解决方案

(1)nodejs:注册登录session出错 解决办法: 在app.js 中将var MongoStore =  require(connect-mongo')改为var MongoStore =  require(connect-mongo')(express) 即可: (2)连接Mongodb数据库时Error connecting to database解决方案 这种情况下是自己的mongodb数据库没有装好 解决办法: a.在官网上下载安装数据库 b.在mongodb文件夹里面新建文件

VS2010重新安装时,“MSI returned error code 1612”的解决方案

时间:Today 地点:420实验室 事件: 在重新安装VS2010 的过程中,总是在.NET Framework 4 Multi-Targeting Pack 这个地方失败. 错误代码如下: [07/19/14,13:41:48] .NET Framework 4 Multi-Targeting Pack: [2] Error: Installation failed for component .NET Framework 4 Multi-Targeting Pack. MSI return