PDA

View Full Version : Kernel Source



glennzo
11th June 2007, 11:35 AM
Trying to install kernel source on my Fedora 7 laptop, as root. My intent is to install the newest alsa drivers but apparently I need source to compile them. When I type rpm -ivh kernel-2.6.21-1.3194.fc7.src.rpm I get an error, error: cannot create %sourcedir /usr/src/redhat/SOURCES. The folder /usr/src exists.

[root@toshiba ~]# ls -l /usr/
total 244
drwxr-xr-x 2 root root 69632 2007-06-11 05:43 bin
drwxr-xr-x 2 root root 4096 2007-04-17 08:46 etc
drwxr-xr-x 2 root root 4096 2007-04-17 08:46 games
drwxr-xr-x 54 root root 4096 2007-06-09 08:22 include
drwxr-xr-x 6 root root 4096 2007-06-07 05:15 kerberos
drwxr-xr-x 145 root root 69632 2007-06-10 08:10 lib
drwxr-xr-x 13 root root 4096 2007-06-10 08:10 libexec
drwxr-xr-x 13 root root 4096 2007-06-07 06:06 local
drwxr-xr-x 2 root root 12288 2007-06-11 05:43 sbin
drwxr-xr-x 261 root root 12288 2007-06-09 18:16 share
drwxr-xr-x 2 root root 4096 2007-04-17 08:46 src
lrwxrwxrwx 1 root root 10 2007-06-07 05:10 tmp -> ../var/tmp


For the record:
[root@toshiba opt]# uname -ra
Linux toshiba 2.6.21-1.3194.fc7 #1 SMP Wed May 23 22:35:01 EDT 2007 i686 i686 i386 GNU/Linux

There are no sub folders under /usr/src. Any thoughts?

pete_1967
11th June 2007, 12:05 PM
`yum install kernel-devel kernel-headers`