CentOS 安装 无线USB网卡 RTL8192EU

Linux CentOS 安装 无线USB网卡 RTL8192EU

由于本人工作环境有代理防火墙,所有必须要使用无线连接自己的热点才能方便测试Linux CentOS。

我装在VMWare 下的linux版本,本次操作在root用户下:

[root@localhost ~]# uname -r
3.10.0-1062.el7.x86_64

连接USB到虚拟机

插入无线usb网卡后需要连接虚拟机!!!!

查看USB设备我的无线网卡是TP-LINK ,网卡芯片是RTL8192EU

[root@localhost ~]# lsusb
...
Bus 003 Device 002: ID 0bda:818b Realtek Semiconductor Corp. RTL8192EU 802.11b/g/n WLAN Adapter
...

首先安装gcc ,详见此博客安装CentOS GCC: https://www.cnblogs.com/xiyushimei/p/8550930.html

以下是我自己安装的截图

我是使用fxpt6上传到Downloads

安装示意图

然后安装linux开发包

上传无线USB网卡驱动,驱动下载: https://download.csdn.net/download/jihuoma123/12256435

进入解压后的文件夹rtl8192EU-Centos7-master使用make 命令安装

出现以下提示安装成功!!!!

[root@localhost rtl8192EU-Centos7-master]# make
[root@localhost rtl8192EU-Centos7-master]# make install
install -p -m 644 8192eu.ko  /lib/modules/3.10.0-1062.el7.x86_64/kernel/drivers/net/wireless/
/sbin/depmod -a 3.10.0-1062.el7.x86_64

安装完后,重启CentOS:

[root@localhost rtl8192EU-Centos7-master]# reboot

查看无线网卡(下面是已经启用了):

[root@localhost ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ....

wls160u2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether XX:XX:XX:XX:XX:XX  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

我是安装的server GUI带界面的,直接在右上角连接无线了。

【安装失败解决方法】:
一、新装CentOS 直接安装驱动会出现报错:未安装CentOS 开发模块(以下是给同事安装的报错信息):

[root@localhost rtl8192EU-Centos7-master]# sudo make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/3.10.0-1062.el7.x86_64/build M=/root/Downloads/rtl8192EU-Centos7-master  modules
make: *** /lib/modules/3.10.0-1062.el7.x86_64/build: No such file or directory.  Stop.
make: *** [modules] Error 2

出现以上错误是未安装
下载相应的rpm包(RPM包下载地址)并安装

[root@localhost Linux_rpm]# rpm -ivh kernel-devel-3.10.0-1062.el7.x86_64.rpm 
warning: kernel-devel-3.10.0-1062.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:kernel-devel-3.10.0-1062.el7     ################################# [100%]

二、新装CentOS 直接安装驱动会出现报错,由于未安装GCC导致如下错误 :

[root@localhost Downloads]# cd rtl8192EU-Centos7-master/
[root@localhost rtl8192EU-Centos7-master]# make
/bin/sh: cc: command not found
(standard_in) 1: syntax error
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/3.10.0-1062.el7.x86_64/build M=/root/Downloads/rtl8192EU-Centos7-master  modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-1062.el7.x86_64'
arch/x86/Makefile:96: stack-protector enabled but compiler support broken
arch/x86/Makefile:166: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended..  Stop.
make[1]: Leaving directory `/usr/src/kernels/3.10.0-1062.el7.x86_64'
make: *** [modules] Error 2

查看GCC,仅安装libgcc

[root@localhost rtl8192EU-Centos7-master]# rpm -qa|grep gcc
libgcc-4.8.5-39.el7.x86_64

可以查看此博客安装CentOS GCC: https://www.cnblogs.com/xiyushimei/p/8550930.html

以上仅为个人使用和安装过程中的经验。

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值