I've seen some others ask this question (particularly this thread:2.5G Ethernet LINUX driver r8125 installation guide) and for the life of me, none of the solutions are working. I was hoping someone had any ideas here on these build errors below? Or how to resolve in an easier way? I'm genuinely just trying to get Ethernet working on this 22.04 build. This is dual boot and I have AOROUS Z790 Pro X.
I have tried installing this list of packages (assuming dependencies) prior to sudo ./autorun.sh by simply moving them with USB and sudo dkpg -i but still, the same result unfortunately.
gcc-11-11.4.0
gcc-11-base-11.4.0
libgcc-11-dev-11.4.0
libasan6_11.4.0
libcc1-0_12.3.0
libquadmath0_12.3.0
libitm1_12.3.0
liblsan0_12.3.0
libtsan0_11.4.0
libusbsan1_12.3.0
Check old driver and unload it.
Build the driver and install
warning: the compiler differs from the one used to build the kernel
Kernel was built by: gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
You are using: gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
make[4]: *** [scripts/Makefile.build:1243: /media/runner/DE82-D641/r8125-9.014.0/src/r8125_n.o] Error 255
make[3]: *** [/usr/src/linux-headers-6.0.0-00-generic/Makefile:1950: /media/runner/DE82-D641/r8125-9.014.0/src] Error 2
make[2]: *** [/usr/src/linux-headers-6.0.0-00-generic/Makefile:195: sub-make] Error 2
make[1]: *** [Makefile:1935: modules] Error 2
make: *** [Makefile:1: default] Error 2```