Sunday, June 3, 2007

Fedora Users: Help with the "make" command

In a few weeks, I'll be teaching a Linux Administration class, and I'll be preparing for my vendor-neutral Linux certifications as well. One of the experiments that I'm doing before class starts is installing Fedora Core 5 on a Pentium II machine. (I got it installed and working, but it was a pain to do!) I digress, though.

While I was working on my install, I was inspired to do a few posts on using Fedora. One of the most popular questions that I found on the Internet was people who were having trouble with using the make command. Particularly, when they use the make command, they get a Can't find kernel build files in .... type of error.

The reason why the Can't find kernel build files in .... occurs is the kernel-devel package is not installed on your machine. So, how to fix the error?

  • If your Fedora machine can connect to the Internet or you are on a network that has a yum server, use the command yum install kernel-devel.

  • If your Fedora machine cannot connect to the Internet, you will need to get the package and use RPM.

    This is the link to Fedora's RPM page


    • To get the actual kernel installed on your machine, run the command uname -r. You want to "jot down" the number that returns to you. For example, on my machine, the number that returned to me was 2.6.15-1.2054_FC5

    • You are going to need the kernel-devel-your kernel number returned from uname -r.rpm file. If this is not in your disk distribution, then you are going to have to find a machine with an Internet connection and download it.

    • Once you get the correct file, assumming that you are in the same directory as where you put the file, run the command rpm -ivh kernel-devel-your kernel number returned from uname -r.rpm





Hope this helps.

No comments: