一、问题描述
使用yum安装软件时出现Error: rpmdb open failed,报错信息显示rpm数据库被损坏。
二、解决方案
重建rpm数据库。
[root@localhost yum.repos.d]# cd /var/lib/rpm
[root@localhost rpm]# ls
Basenames __db.001 __db.003 Group Name Packages Requirename Sigmd5
Conflictname __db.002 Dirnames Installtid Obsoletename Providename Sha1header Triggername
[root@localhost rpm]# rm __db.* -rf
[root@localhost rpm]# ls
Basenames Dirnames Installtid Obsoletename Providename Sha1header Triggername
Conflictname Group Name Packages Requirename Sigmd5
[root@localhost rpm]# rpm --rebuilddb
[root@localhost rpm]# yum clean all
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
正在清理软件源: local nginx
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
三、结果验证
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://hqyman.cn/post/8620.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
休息一下~~