Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 369
Stewart Dick Avatar asked Jun 28 '11 22:06

Stewart Dick


People also ask

Where is kernel header path in Centos?

After installing the kernel-devel package, you can find all the kernel headers files in /usr/src/kernels directory using following command.

Where is kernel-devel installed?

The default location of kernel header files is /usr/src/kernels/ . If no matching kernel headers are found in that directory, go ahead and install kernel headers with yum command as follows.


1 Answers

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 
like image 60
xgMz Avatar answered Oct 13 '22 22:10

xgMz