yum安装某个软件的时候,出现报错
[root@aws ~]# 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 unavailable (11)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed   《===###报错啦
.
.
.
解决报错:
[root@aws ~]# cd /var/lib/rpm/
[root@aws rpm]# ls
Basenames     Dirnames     Installtid    Packages        Pubkeys         Sha1header
Conflictname  Filedigests  Name          Providename     Requirename     Sigmd5
__db.001      Group        Obsoletename  Provideversion  Requireversion  Triggername
[root@aws rpm]# rm __db.* -rf     ###删除rpm原始数据
[root@aws rpm]# rpm --rebuilddb   ###重建rpm数据
[root@aws rpm]#  yum clean all      ###清除yum仓库缓存
Loaded plugins: presto, security
Cleaning repos: ultra-centos-6.8-base ultra-centos-6.8-extras ultra-centos-6.8-updates
              : ultra-centos-6.x-glusterfs ultra-centos-6.x-java ultra-centos-6.x-ultrarepo
Cleaning up Everything
0 delta-package files removed, by presto
[root@aws rpm]#  yum update      ###更新yum仓库源之后就可以正常使用了

更多的博客转移到个人博客上了,请点击以下链接:
个人博客