Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to install the Realtek LAN driver on my RHEL Server (running version 6.4).

In the folder extracted: autorun.sh log.txt Makefile README src

\>type command: ./autorun.sh     
    check old driver and unload it.
    build the module and install    
    make: \***  /lib/modules/2.6.32-358.el6.i686/build: No such file or directory. Stop.    
    make[1]: \*** [clean] Error 2    
    make: *** [clean] Error 2 

But there is a file named "build" in /lib/modules/2.6.32-358.el6.i686/. No "build" directory though.

share|improve this question
up vote 4 down vote accepted

The "build" directory is actually a link to the kernel source code directory:

$ ls -l /lib/modules/2.6.32-358.2.1.el6.x86_64/build
lrwxrwxrwx 1 root root 50 Mar 13 07:52 /lib/modules/2.6.32-358.2.1.el6.x86_64/build -> ../../../usr/src/kernels/2.6.32-358.2.1.el6.x86_64

You need to install the kernel-devel package which "provides kernel headers and makefiles sufficient to build modules" via a command like

# yum install kernel-devel
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.