「RPM, YUM and DNF」- 常见错误

  CREATED BY JENKINSBOT

rpmdb: unable to join the environment

rpmdb: unable to join the environment

问题描述

当执行yum或者rpm命令是,产生如下错误:

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 unavailable (11)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

解决办法

#!/bin/sh

rm -rf /var/lib/rpm/__db*
rpm --rebuilddb