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
  • 相关阅读:
    redis的rpm包下载安装
    linux下创建普通用户并赋予某个目录的读写权限
    nginx软件优化
    GIT分支简单操作
    mysqldump导入导出数据
    rsync守护进程方式同步实例-004
    rsync多模块配置&排除功能-003
    rsync数据同步方式-002
    rsync简单介绍-001
    Redis cluster 日常操作命令
  • 原文地址:https://www.cnblogs.com/morse/p/14476783.html
Copyright © 2011-2022 走看看