You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Orange Pi 4B上WireGuard的正确安装方法咨询(内核兼容问题导致设备失联)

Orange Pi 4B上WireGuard的正确安装方法咨询(内核兼容问题导致设备失联)

我想搭建Minecraft服务器和朋友一起玩,同时需要把我的Orange Pi 4B连接到WireGuard服务器(因为它处于NAT环境下)。但当我尝试用apt install wireguard安装WireGuard时,系统会自动安装新的Linux内核:

orangepi@orangepi4:~$ sudo apt install wireguard

[sudo] password for orangepi:

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

The following additional packages will be installed:

linux-image-5.10.0-27-rt-arm64 linux-image-rt-arm64 wireguard-tools

Suggested packages:

linux-doc-5.10 debian-kernel-handbook

Recommended packages:

firmware-linux-free apparmor

The following NEW packages will be installed:

linux-image-5.10.0-27-rt-arm64 linux-image-rt-arm64 wireguard wireguard-tools

0 upgraded, 4 newly installed, 0 to remove and 27 not upgraded.

Need to get 44.8 MB of archives.

After this operation, 252 MB of additional disk space will be used.

Do you want to continue? [Y/n] n

Abort.

第一次尝试应用WireGuard配置时,系统提示“未知设备类型”(没来得及保存具体报错信息),我查了资料后觉得是内核模块没加载导致的。但重启后我就完全没法通过SSH连接到Orange Pi了,只能重装系统。

重装后我再试安装WireGuard,发现它要装6.x版本的内核,我猜这就是之前设备失联的原因。之后我修正了/etc/apt/sources.list里的源:

-deb http://mirror.docker.ru/debian/ stable main contrib non-free-firmware
+deb http://mirror.docker.ru/debian/ bullseye main contrib non-free

这次看到内核版本和我原本的版本接近,就完成了安装,但之后发现modprobe根本加载不了新的内核模块,无奈之下又卸载了WireGuard。以下是安装后我的内核列表:

orangepi@orangepi4:/boot$ dpkg --list | grep linux-image

ii  linux-image-5.10.0-27-rt-arm64        5.10.205-2                      arm64        Linux 5.10 for 64-bit ARMv8 machines, PREEMPT_RT (signed)
ii  linux-image-current-rk3399            3.0.6                           arm64        Linux kernel, version 5.10.43 # <-- 这是我最初的内核版本
ii  linux-image-rt-arm64                  5.10.205-2                      arm64        Linux for 64-bit ARMv8 machines (meta-package)
orangepi@orangepi4:/boot$ sudo find /boot/ -iname "vmlinuz*"

/boot/vmlinuz-5.10.43 # <-- 这是我最初的内核版本
/boot/vmlinuz-5.10.0-27-rt-arm64

我实在怕再次重启Orange Pi又变“砖”,所以干脆把WireGuard和新安装的内核都卸载了。

现在我想请教:如何在我的Orange Pi 4B上正确安装WireGuard?如果WireGuard这条路走不通,是不是应该改用OpenVPN这类其他方案?


附加系统信息

orangepi@orangepi4:~$ uname -a

Linux orangepi4 5.10.43 #3.0.6 SMP Mon Aug 1 18:31:02 CST 2022 aarch64 GNU/Linux

系统镜像来自Google Drive,设备为Orange Pi 4B。


备注:内容来源于stack exchange,提问作者DMax

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.20 08:59:36