台式机,有块无线网卡,型号TP-Link TL-WN350G,但官方只有Windows下的驱动,无Linux下的驱动,在网上找到解决方案,可用ndiswrapper来在Linux中调用WinXP中的驱动,试行成功,现将骤总结如下:
一, Ndiswrapper的安装:
我安装了CentOS 5.6,当初是标准安装,而ndiswrapper需要调用内核版本的头文档进行编译,所以前期需要做的动作如下:
1. 检查内核版本:
[root@localhost ~]# cat /proc/version
Linux version 2.6.18-238.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 16:24:47 EST 2011
或者用:
[root@localhost ~]# uname -rp
2.6.18-238.el5 i686
2. 去安装盘中找出以下文件:
[root@localhost ~]# ls /packet/ -l
总计 35328
-rw-r--r-- 1 root root 2779295 03-07 22:42 cpp-4.1.2-50.el5.i386.rpm
-rw-r--r-- 1 root root 5448750 03-07 22:42 gcc-4.1.2-50.el5.i386.rpm
-rw-r--r-- 1 root root 2141864 03-07 22:42 glibc-devel-2.5-58.i386.rpm
-rw-r--r-- 1 root root 617083 03-07 22:42 glibc-headers-2.5-58.i386.rpm
-rw-r--r-- 1 root root 18069176 03-07 22:43 kernel-2.6.18-238.el5.i686.rpm
-rw-r--r-- 1 root root 5746395 03-07 22:43 kernel-devel-2.6.18-238.el5.i686.rpm
-rw-r--r-- 1 root root 1185367 03-07 22:43 kernel-headers-2.6.18-238.el5.i386.rpm
-rw-r--r-- 1 root root 73413 03-07 22:43 libgomp-4.4.4-13.el5.i386.rpm
3. 进行相应组件安装:
root@localhost ~]# mkdir /mnt/G
root@localhost ~]# mount -t vfat /dev/hdc5 /mnt/G
root@localhost ~]# cp -rv /mnt/G/packet /
[root@localhost ~]# rpm -ivh /packet/kernel-headers-2.6.18-238.el5.i386.rpm
[root@localhost ~]# rpm -ivh /packet/kernel-2.6.18-238.el5.i686.rpm
[root@localhost ~]# rpm -ivh /packet/libgomp-4.4.4-13.el5.i386.rpm
[root@localhost ~]# rpm -ivh /packet/glibc-headers-2.5-58.i386.rpm
[root@localhost ~]# rpm -ivh /packet/glibc-devel-2.5-58.i386.rpm
[root@localhost ~]# rpm -ivh /packet/cpp-4.1.2-50.el5.i386.rpm
[root@localhost ~]# rpm -ivh /packet/kernel-devel-2.6.18-238.el5.i686.rpm
[root@localhost ~]# rpm -ivh /packet/gcc-4.1.2-50.el5.i386.rpm
4. 进行Ndiswrapper的解压与安装:
[root@localhost ~]# tar -zvxf /ndiswrapper-1.57rc1.tar.gz
[root@localhost ~]# cd ndiswrapper-1.57rc1
[root@localhost ndiswrapper-1.57rc1]# make
[root@localhost ndiswrapper-1.57rc1]# make install
5. 安装无线网卡驱动:
ndiswrapper -i net5211.inf
检查安装结果:
ndiswrapper -l
写入配置文件:
ndiswrapper -m
ndiswrapper -ma
ndiswrapper -mi
然后去/etc/ndiswrapper下看看是否存在net5211目录,目录下应有一些.conf以及.sys文件;
载入模块:
depmod -a
modprobe ndiswrapper
检查一下:
lsmod | grep ndiswrapper
至此安装完毕。