Network Card (RTL8168) installation in RHEL 5

LAN Realtek installation in RHEL5

Operating system: RHEL 5
Problem: Network card driver is not getting installed in RHEL 5
Error: If the command # make install is given, it is giving following error,
[root@linux r8168-8.008.00]# make install
make -C src/ install
make[1]: Entering directory `/tmp/r8168-8.008.00/src'
install -m 744 -c r8168.ko /lib/modules/2.6.18-8.el5/kernel/drivers/net/
install: cannot stat `r8168.ko': No such file or directory
make [1]: *** [install] Error 1
make[1]: Leaving directory `/tmp/r8168-8.008.00/src'
make: *** [install] Error 2

Steps to install:
Unpack the tarball:
# tar vjxf r8168-8.008.00.tar.bz2
Change to the directory:
# cd r8168-8.008.00
If you are running the target kernel, then you should be able to do before doing the follow command, you need to login as root. 
For installing and compiling drivers, package kernel-devel and gcc packages are to be installed.

# rpm =ivh kernel-devel-2.6.18-8.el5

After installing this package, kernel development tools will be installed inside /usr/src/kernels.A link to be created in /usr/src for the kernel tools. For that, execute following command,
# ln -s /usr/src/kernels/2.6.18-8.el5-i686 /usr/src/linux
Now link "linux" is created inside /usr/src.
Now execute # make clean modules
then output will be something similar to following message,
[root@linux r8168-8.008.00]# make clean modules
make -C src/ clean
make[1]: Entering directory `/tmp/r8168-8.008.00/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers *.order
make[1]: Leaving directory `/tmp/r8168-8.008.00/src'
make -C src/ modules
make[1]: Entering directory `/tmp/r8168-8.008.00/src'
make -C /lib/modules/2.6.18-8.el5/build SUBDIRS=/tmp/r8168-8.008.00/src modules
make[2]: Entering directory `/usr/src/kernels/2.6.18-8.el5-i686'
CC [M] /tmp/r8168-8.008.00/src/r8168_n.o
/tmp/r8168-8.008.00/src/r8168_n.c: In function ârtl8168_tx_clearâ:
/tmp/r8168-8.008.00/src/r8168_n.c:3763: warning: unused variable âdevâ
/tmp/r8168-8.008.00/src/r8168_n.c: At top level:
/tmp/r8168-8.008.00/src/r8168_n.c:2420: warning: ârtl8168_phy_power_downâ defined but not used
LD [M] /tmp/r8168-8.008.00/src/r8168.o
Building modules, stage 2.
MODPOST
CC /tmp/r8168-8.008.00/src/r8168.mod.o
LD [M] /tmp/r8168-8.008.00/src/r8168.ko
make[2]: Leaving directory `/usr/src/kernels/2.6.18-8.el5-i686'
strip --strip-debug r8168.ko
make[1]: Leaving directory `/tmp/r8168-8.008.00/src'

Then execute # make install, result will look like as follows,

[root@linux r8168-8.008.00]# make install
make -C src/ install
make[1]: Entering directory `/tmp/r8168-8.008.00/src'
install -m 744 -c r8168.ko /lib/modules/2.6.18-8.el5/kernel/drivers/net/
make[1]: Leaving directory `/tmp/r8168-8.008.00/src'


[root@linux r8168-8.008.00]# /sbin/depmod -a

[root@linux r8168-8.008.00]# insmod /lib/modules/2.6.18-.el5/kernel/drivers/net/r8168.ko

After successful installation,
[root@linux r8168-8.008.00]# lsmod grep r8168 and check for driver is linked with kernel.
Using ifconfig or system-config-network utility, configure the network parameters.

Comments 3 comments

nabin 6 years ago

kernel of centos5 2.6.18-8.els cannot detect inbuilt nic in my laptop compaq 510 , what to do?


balagi27 profile image

balagi27 6 years ago from India Author

First find out which is NIC controller and then respective driver can be downloaded from the site and driver can be made


guna 6 years ago

Hi i tried out but it did not worked out. I upgraded the kernel i also linked the file but still i face problem in installing the driver for rtl 8168. Kindly help me out.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working