CentOS下yum Error 21问题及解决方案。

Sep. 2, 2015 by

执行yum update时出现: error: db5 error(21) from dbenv->open: Is a directory error: cannot open Packages index using db5 – Is a directory (21) error: cannot open Packages database in /var/lib/rpm CRITICAL:yum.main: Error: rpmdb open failed 原因是RPM数据库损坏,重建即可。 执行: cd /var/lib/rpm/ for i