关于在Linux装gcc没有kernel-headers包的问题

网上有很多

公司刚购买的VPS是swsoft做的操作系统模版,这个linux的模版做得很变态,gcc根本没有安装,只能用rpm包安装。虽然不装gcc,系统少了一个安全隐患,可是要安装一些需要编译安装或软件的最新版本是不可能的,源码安装还是*nix世界的王道。一般安装gcc是会提示要glibc,glibc->glibc-header,glibc-header->kernel-header 最后这个kernel-header用baidu真没找也找不到,还上了n多的挂了马的网站。最后用google.com在http://bluequartz.org/docs/fc1kit/gcc.html上找到的了解决办法,原来是要把gcc需要的几个包一起安装

rpm -ihv gcc-3.3.2-1.i386.rpm binutils-2.14.90.0.6-3.i386.rpm \
cpp-3.3.2-1.i386.rpm glibc-devel-2.3.2-101.i386.rpm \
glibc-headers-2.3.2-101.i386.rpm gcc32-3.2.3-6.i386.rpm \
glibc-kernheaders-2.4-8.36.i386.rpm

昨天正好碰到了一次,发现其实不然,至少在Redhat 4上根本不是上面的原因:

[root@localhost RPMS]# rpm -ivh gcc-3.4.6-9.i386.rpm 
warning: gcc-3.4.6-9.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
        glibc-devel >= 2.2.90-12 is needed by gcc-3.4.6-9.i386
    Suggested resolutions:
        /var/spool/up2dateglibc-devel-2.3.4-2.39.i386.rpm
[root@localhost RPMS]# rpm -ivh glibc-devel-2.3.4-2.39.i386.rpm 
warning: glibc-devel-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
        glibc-headers is needed by glibc-devel-2.3.4-2.39.i386
        glibc-headers = 2.3.4-2.39 is needed by glibc-devel-2.3.4-2.39.i386
    Suggested resolutions:
        /var/spool/up2dateglibc-headers-2.3.4-2.39.i386.rpm
[root@localhost RPMS]# rpm -ivh glibc-headers-2.3.4-2.39.i386.rpm 
warning: glibc-headers-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
        kernel-headers is needed by glibc-headers-2.3.4-2.39.i386
        kernel-headers >= 2.2.1 is needed by glibc-headers-2.3.4-2.39.i386
    Suggested resolutions:
        /var/spool/up2dateglibc-kernheaders-2.4-9.1.100.EL.i386.rpm
[root@localhost RPMS]# rpm -ivh glibc-kernheaders-2.4-9.1.100.EL.i386.rpm 
warning: glibc-kernheaders-2.4-9.1.100.EL.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
   1:glibc-kernheaders      ########################################### [100%]
[root@localhost RPMS]# rpm -ivh glibc-headers-2.3.4-2.39.i386.rpm 
warning: glibc-headers-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
   1:glibc-headers          ########################################### [100%]
[root@localhost RPMS]# rpm -ivh glibc-devel-2.3.4-2.39.i386.rpm 
warning: glibc-devel-2.3.4-2.39.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
   1:glibc-devel            ########################################### [100%]
[root@localhost RPMS]# rpm -ivh gcc-3.4.6-9.i386.rpm 
warning: gcc-3.4.6-9.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
   1:gcc                    ########################################### [100%]

看上面的安装记录应该会发现:只要安装上glibc-kernheaders就能继续往下安装了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值