事情起因在安装docker时更新yum时候发现
yum -y install vixie-cron
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 25960.
Another app is currently holding the yum lock; waiting for it to exit…
可能是系统自动升级正在运行,yum在锁定状态中。于是用kill -s 9 25960, ps aux|grep yum
使用kill干掉它;
随后在下载docker过程中:
yum clean all
rpmdb: Thread/process 4541/140619363587840 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 using db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed
提示rpm数据库被损坏,只能按照下面的方法进行重建
cd /var/lib/rpm/
rm __db.* -rf
rpm --rebuilddb
yum clean all
最后安装时候选择y就可以了