Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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     
\>output:     
    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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.