• 使用yum时出现Error: rpmdb open failed解决方案


    一、问题描述

      使用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

    三、结果验证

  • 相关阅读:
    【bozj2287】【[POJ Challenge]消失之物】维护多值递推
    书籍
    图书管理系统-单表的增删改查
    Django之ORM
    app的创建和注册
    登陆示例
    django 静态文件配置
    安装django及配置
    Bootstrap
    导图
  • 原文地址:https://www.cnblogs.com/python-wen/p/10868997.html
Copyright © 2020-2023  润新知