本帖最后由 盛中祥 于 2024-10-2 18:11 编辑
Linux系统安装R8169网卡驱动问题!安装如下:1.rtl下载linux驱动
2.WinSCP上传驱动到tmp
3.解压驱动
4.进入src文件
5.命令make all编译(根据官方说明安装)
出现以下问题?感觉是驱动不能编译到指定文件夹,请大神帮助看看。
root@snack:/tmp/r8169-6.032.00/src# make all
make: cc: No such file or directory
CC: cc
CCVERSION:
KERNEL_GCC_VERSION:
KVER: 6.6.38-trim
KMAJ: 6
KMIN: 6
KREV: 38
BASEDIR: /lib/modules/6.6.38-trim
DRIVERDIR: /lib/modules/6.6.38-trim/kernel/drivers/net/ethernet/realtek
PWD: /tmp/r8169-6.032.00/src
RTKDIR: kernel/drivers/net/ethernet/realtek
make -C /lib/modules/6.6.38-trim/build M=/tmp/r8169-6.032.00/src clean
make[1]: Entering directory '/usr/src/linux-headers-6.6.38-trim'
make[1]: Leaving directory '/usr/src/linux-headers-6.6.38-trim'
make -C /lib/modules/6.6.38-trim/build M=/tmp/r8169-6.032.00/src modules
make[1]: Entering directory '/usr/src/linux-headers-6.6.38-trim'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Debian 12.2.0-14) 12.2.0
You are using:
CC [M] /tmp/r8169-6.032.00/src/r8169_n.o
/bin/sh: 1: gcc: not found
make[3]: *** [scripts/Makefile.build:243: /tmp/r8169-6.032.00/src/r8169_n.o] Error 127
make[2]: *** [/usr/src/linux-headers-6.6.38-trim/Makefile:1921: /tmp/r8169-6.032.00/src] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.6.38-trim'
make: *** [Makefile:98: modules] Error 2
root@snack:/tmp/r8169-6.032.00/src# chmod +x autorun.sh
chmod: cannot access 'autorun.sh': No such file or directory
|