Stewart Dick
Stewart Dick

Reputation: 381

Linux - Yum Install GCC - Missing Kernel-headers

When ever i try to install GCC on my linux (centos) It comes back with missing

glibc-headers-2.5-58.el5_6.4.x86_64 from updates has depsolving problems --> Missing Dependency: kernel-headers is needed by package glibc-headers-2.5- 58.el5_6.4.x86_64 (updates) glibc-headers-2.5-58.el5_6.4.x86_64 from updates has depsolving problems -->

Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5- 58.el5_6.4.x86_64 (updates)

Error: Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5-58.el5_6.4.x86_64 (updates)

Error: Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-58.el5_6.4.x86_64 (updates)


I try yum install kernel-header & kernel-devel but get back:

No package kernel-headers available.

Any suggestions?

Upvotes: 37

Views: 97970

Answers (6)

Lina Maudlej
Lina Maudlej

Reputation: 1

I had the same issue. It seems that I need to install the kernel-devel-xx.rpm (from kernel development package) to my custom kernel:

sudo yum install kernel-devel-xx.rpm

Then you should be able to run:

sudo yum install kernel-devel

Upvotes: 0

Dave Hazelden
Dave Hazelden

Reputation: 1

If you installed from Cloudlinux ISO, you can't do anything until you activate your server against a license, it will throw above error on a VPS.

Upvotes: 0

Benjamin Castor
Benjamin Castor

Reputation: 244

I ran into this issue trying to install VMWare Tools. It required gcc and kernel headers -> kernel headers were missing.

So on Redhat 7.4 I had to execute 'yum install kernel-devel'.

Upvotes: 4

xgMz
xgMz

Reputation: 3344

Your system is probably configured to exclude the kernel packages.

try:

sudo vi /etc/yum.conf

then comment (or remove the 'kernel*' part):

#exclude=kernel*

Then you should be able to do:

sudo yum install kernel-headers

Edit: Or, as pointed by Andrew Beals, you can simply run:

yum install kernel-headers --disableexcludes=all

Upvotes: 107

Andrew Beals
Andrew Beals

Reputation: 1187

Yes, you could edit the yum.conf file, or you could simply do this:

yum install kernel-headers --disableexcludes=all

Do note that even if your admin is trying to install an excluded package from your RHN Satellite server via the normal process, it will still fail due to the local configuration.

(This holds for RHEL6 / cent6 (centos6) as well, of course.)

Upvotes: 17

Will
Will

Reputation: 871

try

yum search kernel-headers

gives:

arm-gp2x-linux-kernel-headers.noarch : Kernel headers for Cross Compiling to
                                     : arm-gp2x-linux
kernel-headers.x86_64 : Header files for the Linux kernel for use by glibc

Upvotes: 1

Related Questions