AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-531624

crypton's questions

Martin Hope
crypton
Asked: 2022-06-28 09:27:06 +0800 CST

在 Fedora 36 (5.18.5) 上安装 realtek r8168?

  • 0

Linux noob 在这里(开始)。之前我进行了几次成功的安装试验,现在我决定采用一种配置。我现在无法让我的网卡工作。

台式电脑,非常旧的系统 - AMD Phenom II 955,技嘉 GA-MA790XT-UD4P

我感兴趣的驱动是: GBE Ethernet LINUX driver r8168 for kernel up to 5.17

背景:我使用 USB-Ethernet 加密狗尝试了一些 r8168 安装教程,并且 dnf upgrade 已将我的内核从全新安装的 5.17 更新到 5.18。-> 因此我怀疑内核不一致但如何返工呢?

内核正在使用 r816 9驱动程序 (lspci -v),我知道它不适用于我的系统!使用驱动程序包含的 autorun.sh 确实适用于 fedora 35(我相信就像半年前一样),而且我之前也成功地能够在 Ubuntu 上安装 r8168 驱动程序。

从文件夹中执行“$ sudo ./autorun.sh”会得到以下输出:

Check old driver and unload it
Build the module and install
make[2]: *** /lib/modules/5.18.5-200.fc36.x86_64/build: No such file or directory. Stop.
make[1]: *** [Makefile:158: clean] Error 2
make: *** [Makefile:48: clean] Error 2

因此,我不知何故需要强制 Fedora 使用 r8168,但我不知道如何 - 没有互联网访问权限(呃,因为 GBE 以太网卡不工作)。而且我希望这个解决方案在没有 USB-Ethernet 加密狗的情况下也能正常工作。

我检查了那个位置,它列出了构建文件,但是打开“构建”会弹出一个对话框:

The link "build" is broken. 
This link cannot be used because its target "usr/src/kernels/5.18.5-200.fc36.x86_64" doesn't exist

编辑:

管理为 5.18.6-200* 和所有依赖项安装 kernel-devel。现在,当运行驱动程序的 autorun.sh 时,我得到以下输出:

Check old driver and unload it.
Build the module and install
/home/am/Documents/r8168-8.050.03/src/r8168_n.c: In function ‘rtl8168_mac_loopback_test’:
/home/am/Documents/r8168-8.050.03/src/r8168_n.c:3717:17: error: implicit declaration of function ‘pci_dma_sync_single_for_device’; did you mean ‘dma_sync_single_for_device’? [-Werror=implicit-function-declaration]
 3717 |                 pci_dma_sync_single_for_device(tp->pci_dev,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 dma_sync_single_for_device
/home/am/Documents/r8168-8.050.03/src/r8168_n.c: In function ‘rtl8168_init_board’:
/home/am/Documents/r8168-8.050.03/src/r8168_n.c:26448:14: error: implicit declaration of function ‘pci_set_dma_mask’ [-Werror=implicit-function-declaration]
26448 |             !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
      |              ^~~~~~~~~~~~~~~~
/home/am/Documents/r8168-8.050.03/src/r8168_n.c:26449:14: error: implicit declaration of function ‘pci_set_consistent_dma_mask’ [-Werror=implicit-function-declaration]
26449 |             !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:288: /home/am/Documents/r8168-8.050.03/src/r8168_n.o] Error 1
make[2]: *** [Makefile:1842: /home/am/Documents/r8168-8.050.03/src] Error 2
make[1]: *** [Makefile:154: modules] Error 2
make: *** [Makefile:41: modules] Error 2

有什么好主意可以尝试吗?


我发现的最接近的主题是:

  • 如何为 Fedora 构建“akmod-r8168”驱动内核模块包?

这并没有说明安装是如何实际完成的,因此我不知道如何应用它。

  • https://tutorialforlinux.com/2021/05/04/step-by-step-fedora-34-realtek-rtl81168-driver/2/

这假设我可以访问互联网进行 dnf 升级和其他东西 - 不行。

fedora ethernet
  • 1 个回答
  • 513 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve