pivpn / pivpn

The Simplest VPN installer, designed for Raspberry Pi
https://pivpn.io
MIT License
7.11k stars 628 forks source link

[Install Failed]: Ubuntu 24.04 LTS, missing wireguard-dkms package #1837

Open myazaki opened 3 months ago

myazaki commented 3 months ago

In raising this issue I confirm that

Describe the issue

Installation using curl -L https://install.pivpn.io | bash under root user ends up saying:

::: Installing WireGuard...
:::    Checking for wireguard-tools... not installed!
:::    Checking for qrencode... not installed!
:::    Checking for linux-headers-generic... not installed!
:::    Checking for wireguard-dkms... not installed!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package wireguard-dkms
:::    Failed to install wireguard-tools!
:::    Failed to install qrencode!
:::    Failed to install linux-headers-generic!
:::    Failed to install wireguard-dkms!

I believe the reason is that my VPS shares the kernel with the host and thus wireguard-dkms cannot be installed. It is not needed anyway. Host is running https://vpsadminos.org.

Expected behavior

wireguard-dkms to be skipped, it is not needed.

Please describe the steps to replicate the issue

This is kind of non-standard VPS setup. You need to install https://vpsadminos.org on host machine, then create a VPS/Container with Ubuntu 24.04 LTS, login to that VPS and install using curl -L https://install.pivpn.io | bash. That is it.

Have you taken any steps towards solving your issue?

no

Screenshots

No response

Where did you run pivpn?

VPS with Ubuntu 24.04 LTS

Please provide your output from uname -a

Linux apu 6.6.17 #1-vpsAdminOS SMP PREEMPT_DYNAMIC Sun Feb 18 17:25:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Details about Operative System

PRETTY_NAME="Ubuntu 24.04 LTS" NAME="Ubuntu" VERSION_ID="24.04" VERSION="24.04 LTS (Noble Numbat)" VERSION_CODENAME=noble ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=noble LOGO=ubuntu-logo

myazaki commented 3 months ago

Did some investigation and the module is builtin, so I only need to install wireguard-tools and it works. Somehow the installer cannot detect it?

orazioedoardo commented 2 months ago

I've tested the server image again and the kernel module is correctly detected, what's the output of dpkg-query -S '*wireguard.ko*' on your VPS?

myazaki commented 2 months ago

sudo dpkg-query -S 'wireguard.ko' dpkg-query: no path found matching pattern wireguard.ko

It is not the same my VPS ubuntu 24.04 has different kernel as it is sharing it with the host.

orazioedoardo commented 2 months ago

I don't know how to detect it though. How about the output of modinfo wireguard ?

myazaki commented 2 months ago

Not detected. What about this?

image

orazioedoardo commented 2 months ago

Does it show up even when wireguard is not being used at all?

myazaki commented 2 months ago

It is output from system where it is not installed nor used.