2

我最近安装了wireguard-tools 并多次重启了我的机器。但是,它根本不会运行。我每次都会收到此错误:

Warning: `/etc/wireguard/myprovider.conf' is world accessible
[#] ip link add myprovider type wireguard
Error: Unknown device type.
Unable to access interface: Protocol not supported
[#] ip link delete dev myprovider
Cannot find device "provider"

然后我运行 dkms status 并且它完全空白,即使在重新启动后也是如此。在网上看,似乎没有其他人的 dkms 空白。我的内核版本是 5.5.13-200.fc31.x86_64,这是我能去的最新版本。我已经尝试过清理软件包、更新然后重新安装wireguard 的一般建议,但它没有奏效。我应该从这里做什么?这是否需要重新安装整个操作系统?

4

2 回答 2

0

显示什么modinfo wireguard

Wireguard 包含在 Linux 5.6 及更高版本中。在您的 5.5 内核上,您需要安装内核模块。

我是 Debian 用户,但在 Fedora 上应该可以:

$ sudo dnf copr enable jdoss/wireguard
$ sudo dnf install wireguard-dkms wireguard-tools

wireguard-tools 只安装工具,wireguard-dkms 内核模块,这将完成实际工作。

参考

于 2020-05-07T18:40:50.123 回答
0

我通过升级wireguard解决了它:

sudo apt-get upgrade wireguard

这是终端结果:

(...)
Preparing to unpack .../92-wireguard-dkms_1.0.20200520-0ppa1~18.04_all.deb ...

-------- Uninstall Beginning --------
Module:  wireguard
Version: 1.0.20200401
Kernel:  5.3.0-46-generic (x86_64)
-------------------------------------

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

wireguard.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.3.0-46-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.

-------- Uninstall Beginning --------
Module:  wireguard
Version: 1.0.20200401
Kernel:  5.3.0-51-generic (x86_64)
-------------------------------------

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

wireguard.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.3.0-51-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.20200401
completely from the DKMS tree.
------------------------------
Done.
(...)

然后 sudo wg-quick up {conf_name} 再次工作。

于 2020-06-11T19:24:50.123 回答