Where in the RHEL is my version.h file?

Kevin Brown kevin_brown at qwest.net
Sun Mar 5 21:23:36 MST 2006


> I'm trying to install the ALSA driver package (yes, that one ...) 
> under CentOS 4.2.  Here's where I'm hung up:
> 
> ./configure --with-cards=sb16 --with-sequencer=yes \ 
> --with-kernel=/usr/src/linux-2.6.9-11.EL
> 
> I get this message: checking for kernel version... The file
> /usr/src/linux-2.6.9-11.EL/include/linux/version.h does not exist. 
> Please, install the package with full kernel sources for your 
> distribution ...
> 
> It speaks the truth.  The file isn't there, and I think it should be.
> 
> 
> This was after a few attempts.  I installed
> kernel-sourcecode-2.6.9-11.EL and the directory
> /usr/src/linux-2.6.9-11.EL/include/linux is present, but the
> version.h file does not exist there.

Pretty much a RH noob mistake.  In older versions of RH it was part of
the kernel-devel package.  Last I checked that got changed to be the
glibc-kernheaders package.  Any rpm that says source in the name or is
type src.rpm is usually not what you want to install to solve a
dependency problem.  You install source packages (those with source in
the name) if you intend to compile it from scratch in the usual methods
(e.g. ./configure && make && make install).  You would use .src.rpm
files if you were going to rebuild a package from scratch for your
systems with maybe some customization (e.g. rpmbuild --rebuild
package.src.rpm).

> A number of the header files in that directory do have includes for 
> <linux/version.h> ... so I searched for any directory or link
> system-wide named "linux" that might satisfy linux/version.h.  Struck
> out again.
> 
> I searched the system for all the version.h files, thinking I could
> find one to link to, but they all look application specific except
> for /usr/include/linux/version.h.  That is a strange looking file: 
> #define UTS_RELEASE "2.4.20" #define LINUX_VERSION_CODE 132116 
> #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
> 
> The numbers here don't look right.  And I'm on 2.6.9-22.0.2.EL #1 
> according to uname -a.
> 
> So ... I'd appreciate any ideas as to how to find (or create?) a
> version.h file to meet the needs of this ./configure script.  I
> haven't yet tried hacking into the configure script itself, and hope
> to avoid that . . .


More information about the PLUG-discuss mailing list