绿水寒烟 2023-03-14 15:20 采纳率: 83.3%
浏览 19
已结题

yum install php出现这个问题,当时 rpm -Uvh

yum install php出现这个问题,当时 rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rp%E4%BA%86%EF%BC%8C%E6%80%8E%E4%B9%88%E5%A4%84%E7%90%86

One of the configured repositories failed (未知),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=<repoid> ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable <repoid>
    or
        subscription-manager repos --disable=<repoid>

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

database disk image is malformed

  • 写回答

4条回答 默认 最新

  • MarkHan_ 2023-03-14 15:45
    关注

    该回答引用GPTᴼᴾᴱᴺᴬᴵ
    这个错误信息提示出现了一个损坏的数据库磁盘映像文件,可能是由于系统异常关闭或磁盘故障等原因导致的。这可能会导致yum仓库无法正常更新或安装软件包。为了解决这个问题,可以尝试以下方法之一:

    1. 重建缓存:运行“yum clean all”命令清除yum缓存并重建缓存。

    2. 删除缓存:删除/var/cache/yum目录下的缓存文件,然后再次运行yum命令。

    3. 修复数据库:运行“yum-complete-transaction”或“yum-complete-transaction --cleanup-only”命令来完成任何未完成的yum交易,然后运行“yum check”命令检查和修复任何损坏的数据库文件。

    4. 重建数据库:运行“rpm --rebuilddb”命令重建rpm数据库,然后运行“yum clean all”命令清除yum缓存并重建缓存。

    如果上述方法都不起作用,可能需要考虑重新安装操作系统或寻求专业人员的帮助。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 系统已结题 3月23日
  • 已采纳回答 3月15日
  • 创建了问题 3月14日

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看