linux - 在Raspberry Pi上尝试Wireguard失败,出现 “RTNETLINK answers: Operation not supported”

标签 linux raspberry-pi wireguard

我尝试过的步骤

  • 我正在尝试在Raspberry pi上设置Wireguard客户端

  • 这是二手的配置
    # /etc/wireguard/wg0-client.conf
    [Interface]
    Address = 10.10.0.4/32
    Address = fd86:ea04:1111::4/128
    SaveConfig = true
    PrivateKey = CLIENT-PRIVATE-KEY
    DNS = 8.8.8.8
    
    [Peer]
    PublicKey = SERVER-PUBLIC-KEY
    Endpoint = SERVER-PUBLIC-IP:PORT
    AllowedIPs = 0.0.0.0/0, ::/0
    
  • 设置Wireguard配置后,我运行sudo wg-quick up wg0-client,它像
  • 一样失败
    pi@raspberrypi:~ $ sudo wg-quick up wg0-client
    [#] ip link add wg0-client type wireguard
    RTNETLINK answers: Operation not supported
    Unable to access interface: Protocol not supported
    [#] ip link delete dev wg0-client
    Cannot find device "wg0-client"
    

    the Wireguard server side has been working for a while with other devices, so I do not paste the info here


    操作系统和硬件环境
    /etc/os-release 信息
    pi@raspberrypi:~ $ cat /etc/os-release 
    PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
    NAME="Raspbian GNU/Linux"
    VERSION_ID="10"
    VERSION="10 (buster)"
    VERSION_CODENAME=buster
    ID=raspbian
    ID_LIKE=debian
    HOME_URL="http://www.raspbian.org/"
    SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
    BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
    
    /sys/firmware/devicetree/base/model 了解硬件信息
    Raspberry Pi 3 Model B Rev 1.2
    

    最佳答案

    前几天,我为我的Pi-2解决了这一问题,方法是删除Wireguard将内核更新/升级到最新版本,安装内核头文件,然后重新安装Wireguard。在那之后像魅力一样工作。
    但是,您可能只需要内核头文件。
    您可以尝试先进行“sudo apt-get install raspberrypi-kernel-headers”。
    我上线了:
    Linux raspberrypi 4.19.118-v7 +#1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux

    关于linux - 在Raspberry Pi上尝试Wireguard失败,出现 “RTNETLINK answers: Operation not supported”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62629819/

    相关文章:

    embedded-linux - Yocto SYSTEMD_SERVICE 安装参数化服务 ("@.service")

    linux - 从文件中替换文件中的字符串

    c++ - 在 Linux 上链接 C++ 库

    python - 使用 workon 时导入失败(python)

    android - 使用 TeamViewer Host 进行屏幕镜像 android things (RPI)

    ios - wireguard ios,路由 ip+net : sysctl: operation not supported

    java - 为 .NET 开发人员推荐 Linux + Java 书籍和资源

    linux - 如何在centos中保存repo文件

    Python Tkinter GUI 执行 python 脚本错误

    endpoint - Wireguard 配置文件中的 Endpoint 和 AllowedIPs 字段有什么区别?