centos4.6系统,使用yum更新openssh时,出现报错
yum update openssh
rpmdb: unable to join the environment
error: db4 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
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 80, in main
......
......
TypeError: rpmdb open failed
是因为rpm包的数据库损坏了,影响所有软件的升级、安装和卸载等,rpm命令和yum命令都不能使用了,解决方法如下:
cd /var/lib/rpm/
mkdir db_bak
mv db.* db_bak
rpm --rebuilddb 重建rpm数据库
yum clean all
操作无误后,应该可以正常使用rpm和yum命令安装软件包了
阅读(3014) | 评论(0) | 转发(0) |