zoukankan      html  css  js  c++  java
  • 修复缺少 Kernel-Headers on CentOS 7,导致 gcc glibc-headers安装失败

    问题:

    --> Finished Dependency Resolution
    --> Finding unneeded leftover dependencies
    Found and removing 0 unneeded dependencies
    Error: Package: glibc-headers-2.17-323.el7_9.x86_64 (updates)
               Requires: kernel-headers >= 2.2.1
    Error: Package: glibc-headers-2.17-323.el7_9.x86_64 (updates)
               Requires: kernel-headers
     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest
    

      

    解决:

    刚开始以为是yum源的问题,换了阿里源之后发现安装gcc还是失败,当时简单执行了 yum install kernel-headers 发现 Nothing to do,最后在国外一篇博客看到处理方式尝试后解决了问题。

    $ yum install kernel-headers --disableexcludes=all

    disableexcludes 选项解释: https://www.cnblogs.com/dream397/p/13086679.html  

    If the above solution doesn’t work well on your CentOS 7 server, you can follow other solutions below.

    1.) First of all, we need to edit the yum.conf file under the /etc/ directory. Because your CentOS 7 system is most likely to exclude kernel packages, so we need to fix this.

    $ nano /etc/yum.conf

    2.) Please look for the exclude=kernel line, well we need to comment or delete this line.

    Change from:

    $ exclude=kernel*

    To:

    $ #exclude=kernel*

    3.) Finally, let’s install kernel-headers on your CentOS 7 system.

    $ yum install kernel-headers
  • 相关阅读:
    0302思考并回答一些问题
    1231 实验四 递归下降语法分析程序设计
    1118 实验三 有限自动机的构造与识别
    1112对他人的博客评论及建议
    1029c语言文法
    1022词法分析实验总结
    词法分析
    0330 复利计算——单元测试
    0321 读《构建之法》第一,二,三章有感
    0316 复利计算总结(0330 更新)
  • 原文地址:https://www.cnblogs.com/morse/p/14476783.html
Copyright © 2011-2022 走看看