yum安装gcc报错kernel-headers

简介:

在编译apr的时候,报错gcc没有安装,于是yum安装gcc,同样报错。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[root@plinuxos src] # yum install -y gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
  * base: mirrors.btte.net
  * epel:  ftp .cuhk.edu.hk
  * extras: mirrors.btte.net
  * updates: mirrors.btte.net
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-11.el7 will be installed
--> Processing Dependency: cpp = 4.8.5-11.el7  for  package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12  for  package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit)  for  package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit)  for  package: gcc-4.8.5-11.el7.x86_64
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-11.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-157.el7_3.5 will be installed
--> Processing Dependency: glibc-headers = 2.17-157.el7_3.5  for  package: glibc-devel-2.17-157.el7_3.5.x86_64
--> Processing Dependency: glibc = 2.17-157.el7_3.5  for  package: glibc-devel-2.17-157.el7_3.5.x86_64
--> Processing Dependency: glibc-headers  for  package: glibc-devel-2.17-157.el7_3.5.x86_64
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
--> Running transaction check
---> Package glibc.x86_64 0:2.17-157.el7_3.4 will be updated
--> Processing Dependency: glibc = 2.17-157.el7_3.4  for  package: glibc-common-2.17-157.el7_3.4.x86_64
---> Package glibc.x86_64 0:2.17-157.el7_3.5 will be an update
---> Package glibc-headers.x86_64 0:2.17-157.el7_3.5 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1  for  package: glibc-headers-2.17-157.el7_3.5.x86_64
--> Processing Dependency: kernel-headers  for  package: glibc-headers-2.17-157.el7_3.5.x86_64
--> Running transaction check
---> Package glibc-common.x86_64 0:2.17-157.el7_3.4 will be updated
---> Package glibc-common.x86_64 0:2.17-157.el7_3.5 will be an update
---> Package glibc-headers.x86_64 0:2.17-157.el7_3.5 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1  for  package: glibc-headers-2.17-157.el7_3.5.x86_64
--> Processing Dependency: kernel-headers  for  package: glibc-headers-2.17-157.el7_3.5.x86_64
--> Finished Dependency Resolution
Error: Package: glibc-headers-2.17-157.el7_3.5.x86_64 (updates)
            Requires: kernel-headers >= 2.2.1
Error: Package: glibc-headers-2.17-157.el7_3.5.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

安装kernel-headers即可解决问题

1
2
wget http: //vault .centos.org /5 .7 /os/x86_64/CentOS/kernel-headers-2 .6.18-274.el5.x86_64.rpm
rpm -ivh kernel-headers-2.6.18-274.el5.x86_64.rpm













本文转自Grodd51CTO博客,原文链接:http://blog.51cto.com/juispan/1953606 ,如需转载请自行联系原作者
相关文章
|
10天前
|
Linux C语言
linux yum安装ffmpeg 图文详解
linux yum安装ffmpeg 图文详解
28 0
|
10天前
|
Linux
linux yum 安装rar和unrar
linux yum 安装rar和unrar
35 0
|
1月前
|
Linux 编译器 开发工具
Linux:详解(yum的使用、vim编辑器命令集合以及gcc/g++编译器的使用)
Linux:详解(yum的使用、vim编辑器命令集合以及gcc/g++编译器的使用)
114 1
|
3月前
|
NoSQL 编译器 开发工具
006.gcc编译器
gcc是什么?
43 0
006.gcc编译器
|
4天前
|
C语言
转载 - gcc/ld 动态连接库和静态连接库使用方法
本文介绍了如何在GCC中实现部分程序静态链接、部分动态链接。使用`-Wl`标志传递链接器参数,`-Bstatic`强制链接静态库,`-Bdynamic`强制链接动态库。
15 0
|
10天前
|
关系型数据库 MySQL Linux
CentOS 7 下使用yum安装MySQL5.7.20 最简单 图文详解
CentOS 7 下使用yum安装MySQL5.7.20 最简单 图文详解
47 0
|
22天前
|
Linux
Linux: yum查看、安装、删除软件包
Linux: yum查看、安装、删除软件包
27 0
|
1月前
|
编译器 C语言 C++
列举gcc 常见和有用的编译警告选项
列举gcc 常见和有用的编译警告选项
11 0
|
1月前
|
编译器 C语言
gcc编译警告:warning: suggest parentheses around assignment used as truth value
gcc编译警告:warning: suggest parentheses around assignment used as truth value
16 0
|
1月前
|
编译器 Linux C语言
gcc编译器的使用方法
gcc编译器的使用方法
20 1