修复rpmdb损坏故障
进行任何rpm操作时提示:
#rpm -qa|grep openssl|grep openssl-1.0.1e|wc -l
error: db3 error(12) from dbenv->open: Cannot allocate memory error: db3 error(12) from dbenv->close: Cannot allocate memory error: cannot open Packages index using db3 - Cannot allocate memory (12) error: cannot open Packages database in /var/lib/rpm error: db3 error(12) from dbenv->open: Cannot allocate memory error: db3 error(12) from dbenv->close: Cannot allocate memory error: cannot open Packages database in /var/lib/rpm
#这是由于rpm数据库文件损坏所致
解决办法:
#rm -rf /var/lib/rpm/__db*
# rpm --rebuilddb
#将rpm数据库文件删除再重建,以root来运行上面的两条命令,问题解决。