Cant install r8126 from AUR

I have a MSI motherboard with a Realtek RTL8125B ethernet card so I need to install r8125-dkms from AUR

But all I get is this error:
==> Removing existing $srcdir/ directory…
==> Extracting sources…
-> Extracting 9.003.05.tar.gz with bsdtar
==> Sources are ready.
==> Making package: r8125 9.003.05-1 (sön 11 okt 2020 12:58:41)
==> Checking runtime dependencies…
==> Checking buildtime dependencies…
==> WARNING: Using existing $srcdir/ tree
==> Starting build()…
/home/niclas/.cache/yay/r8125/PKGBUILD: line 19: /usr/src/linux/version: No such file or directory
==> ERROR: A failure occurred in build().
Aborting…

I’m running Manjaro Gnome with kernel 5.8.11-1-MANJARO. Everything fully updated

Any idea how to fix this?

Why not use:

sudo insmod /usr/lib/modules/5.8.11-1-MANJARO/kernel/drivers/net/ethernet/realtek/r8169.ko.xz

and if needed

pamac build realtek-firmware

Since the r8169 should support the 8125 that should work (you perhaps also need the firmware)

@SLaItEr: sudo insmod /usr/lib/modules/5.8.11-1-MANJARO/kernel/drivers/net/ethernet/realtek/r8169.ko.xz
Gives me:
insmod: ERROR: could not insert module /usr/lib/modules/5.8.11-1-MANJARO/kernel/drivers/net/ethernet/realtek/r8169.ko.xz: File exists

And the other:
pamac build realtek-firmware [130]
Preparing…
Cloning realtek-firmware build files…
Checking realtek-firmware dependencies…
Warning: removing linux-firmware breaks dependency ‘linux-firmware’ required by linux58
Add linux58 to remove
Error: Failed to prepare transaction:
could not satisfy dependencies:

  • removing linux58 breaks dependency ‘linux58’ required by linux58-nvidia-450xx,
  • if possible, remove linux58-nvidia-450xx and retry
  • removing linux58 breaks dependency ‘linux>=3.4’ required by manjaro-system,
  • if possible, remove manjaro-system and retry
    Resolving dependencies…
    Checking inter-conflicts…
    Error: Failed to prepare transaction:
    could not satisfy dependencies:
  • removing linux58 breaks dependency ‘linux58’ required by linux58-nvidia-450xx,
  • if possible, remove linux58-nvidia-450xx and retry
  • removing linux58 breaks dependency ‘linux>=3.4’ required by manjaro-system,
  • if possible, remove manjaro-system and retry

Edit build files ? [y/N]

Okay a different approach.

Your sure the kernel headers are installed?

pamac install linux58-headers

Also before installing the dkms package
does:

sudo modprobe r8169

work?

Yes they are installed:
pamac install linux58-headers
Preparing…
Nothing to do.
Transaction successfully finished.

/usr/scr/ is empty. No files or folders

seems to be

/usr/include/linux

Then why do the AUR packege point to /usr/src/??

Tried to change the patch to /usr/include/

But I get this

==> Removing existing $pkgdir/ directory…
==> Starting build()…
/home/niclas/.cache/yay/r8125/PKGBUILD: line 19: /usr/include/linux/version: No such file or directory
==> ERROR: A failure occurred in build().
Aborting…

5 lines have to be changed = 3x PKGBUILD & 2x dkms.conf

PKGBUILD:
Line 16
from

            '7a6b42b6ebbd76ae3c40e10f824c2dae88448fab3ba074916b3be5c2b4bef448')

to

            'SKIP')

Line 19 and 28
from

  _kernver=$(</usr/src/linux/version)

to

  _kernver=$(uname -r)

and

dkms.conf:
Line 3 and 4
from

MAKE="make -C $kernel_source_dir M=$source_tree/@_PKGBASE@-@PKGVER@/src modules"
CLEAN="make -C $kernel_source_dir M=$source_tree/@_PKGBASE@-@PKGVER@/src clean"

to

MAKE="make -C $kernel_source_dir M=$dkms_tree/r8125/9.003.05/build/src modules"
CLEAN="make -C $kernel_source_dir M=$dkms_tree/r8125/9.003.05/build/src clean"

after this … my test works

terminal output
makepkg -sr
==> Erstelle Paket: r8125 9.003.05-1 (So 11 Okt 2020 16:05:21 CEST)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> Empfange Quellen...
  -> 9.003.05.tar.gz gefunden
  -> dkms.conf gefunden
==> Überprüfe source Dateien mit sha256sums...
    9.003.05.tar.gz ... Durchgelaufen
    dkms.conf ... Übersprungen
==> Entpacke Quellen...
  -> Entpacke 9.003.05.tar.gz mit bsdtar
==> Entferne existierendes $pkgdir/ Verzeichnis...
==> Beginne build()...
make: Verzeichnis „/usr/lib/modules/5.8.14-1-MANJARO/build“ wird betreten
make: Verzeichnis „/usr/lib/modules/5.8.14-1-MANJARO/build“ wird verlassen
==> Betrete fakeroot Umgebung...
==> Beginne package_r8125()...
  -> Starting make install...
==> Säubere Installation...
  -> Entferne libtool Dateien...
  -> Bereinige ungewollte Dateien...
  -> Entferne statische Bibliotheken...
  -> Entferne unnötige Symbole aus Binär-Dateien und Bibliotheken...
  -> Komprimiere Man-Pages und Info-Seiten...
==> Prüfe auf Paketierungsprobleme...
==> Erstelle Paket "r8125"...
  -> Erstelle .PKGINFO Datei...
  -> Erstelle .BUILDINFO Datei...
  -> Erstelle .MTREE-Datei...
  -> Komprimiere Paket... 
==> Beginne package_r8125-dkms()...
==> Säubere Installation...
  -> Entferne libtool Dateien...
  -> Bereinige ungewollte Dateien...
  -> Entferne statische Bibliotheken...
  -> Entferne unnötige Symbole aus Binär-Dateien und Bibliotheken...
  -> Komprimiere Man-Pages und Info-Seiten...
==> Prüfe auf Paketierungsprobleme...
==> WARNUNG: Paket enthält einen Verweis auf $srcdir
usr/src/r8125-9.003.05/src/.Module.symvers.cmd
usr/src/r8125-9.003.05/src/r8125.o
usr/src/r8125-9.003.05/src/.r8125.o.cmd
usr/src/r8125-9.003.05/src/r8125.mod
usr/src/r8125-9.003.05/src/.rtl_eeprom.o.cmd
usr/src/r8125-9.003.05/src/.r8125.mod.o.cmd
usr/src/r8125-9.003.05/src/r8125_n.o
usr/src/r8125-9.003.05/src/.r8125.mod.cmd
usr/src/r8125-9.003.05/src/.rtltool.o.cmd
usr/src/r8125-9.003.05/src/modules.order
usr/src/r8125-9.003.05/src/.r8125_n.o.cmd
usr/src/r8125-9.003.05/src/r8125.ko
usr/src/r8125-9.003.05/src/.modules.order.cmd
usr/src/r8125-9.003.05/src/.r8125.ko.cmd
==> Erstelle Paket "r8125-dkms"...
  -> Erstelle .PKGINFO Datei...
  -> Erstelle .BUILDINFO Datei...
  -> Erstelle .MTREE-Datei...
  -> Komprimiere Paket... 
==> Verlasse fakeroot Umgebung.
==> Beendete Erstellung: r8125 9.003.05-1 (So 11 Okt 2020 16:05:29 CEST)

I’ve managed to make a tar.z file called r8125-9.003.05-1.src.tar.gz but how do I install it?

You should have built a file called r8125-dkms-9.003.05-1-x86_64.pkg.tar.xz and then install it with sudo pacman -U <path-to-file>

1 Like