无法在 Ubuntu 20.04 上 modprobe wireguard

无法在 Ubuntu 20.04 上 modprobe wireguard

更新:这似乎是我的主机提供商 (1blu) 的问题。在我的本地计算机和其他服务器(不同的主机提供商)上加载模块非常顺利。

我无法在 Ubuntu 20.04 上使 wireguard 工作。我认为我的主要问题是未加载 wireguard 模块。当我加载时,modprobe wireguard我得到:

modprobe: FATAL: Module wireguard not found in directory /lib/modules/5.4.0

该错误消息是有道理的,因为 wireguard 模块已经构建为/lib/modules/5.4.0-77-generic/updates/dkms/wireguard.ko

$ find / -iname "*wireguard.ko*"
/lib/modules/5.4.0-77-generic/updates/dkms/wireguard.ko

我执行的时候也对下面的错误信息感到很疑惑lsmod | grep wireguard,不知道是否和wireguard有关:

libkmod: ERROR ../libkmod/libkmod-module.c:1941 kmod_module_get_holders: could not open '/sys/module/crct10dif_pclmul/holders': No such file or directory

我该怎么做才能加载 wireguard 模块?

以下是一些可能相关的信息:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

$ uname -a
Linux mysecrethostname 5.4.0 #1 SMP Mon Dec 9 19:36:21 MSK 2019 x86_64 x86_64 x86_64 GNU/Linux

已安装 linux-headers 软件包: linux-headers-5.4.0-77, linux-headers-5.4.0-77-generic,linux-headers-generic

Wireguard 版本:

wireguard 1.0.20200513-1~20.04.2
wireguard-dkms 1.0.20201112-1~20.04.1
wireguard-tools 1.0.20200513-1~20.04.2

模块构建日志:

-------- Uninstall Beginning --------
Module:  wireguard
Version: 1.0.20201112
Kernel:  5.4.0-77-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

wireguard.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.4.0-77-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod...

DKMS: uninstall completed.

------------------------------
Deleting module version: 1.0.20201112
completely from the DKMS tree.
------------------------------
Done.
Loading new wireguard-1.0.20201112 DKMS files...
It is likely that 5.4.0 belongs to a chroot's host
Building for 5.4.0 and 5.4.0-77-generic
Module build for kernel 5.4.0 was skipped since the
kernel headers for this kernel does not seem to be installed.
Building initial module for 5.4.0-77-generic

Done.

wireguard.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.4.0-77-generic/updates/dkms/

depmod...

DKMS: install completed.

相关内容