I have a VPS server running Ubuntu 18.04 LTS where I wanted to install a WireGuard VPN service. I have started with adding the repository and then installing the module which is running fine and without any error messages.
add-apt-repository ppa:wireguard/wireguard
apt-get update
apt-get install wireguard-dkms wireguard-tools
Then, I wanted to load the kernel module using
sudo modprobe wireguard
but, modprobe
tells me, that it is unable to locate the kernel module.
modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/4.15.0/modules.builtin.bin'
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.15.0
Rereading the console output, the installer told me that it had installed the module to /lib/modules/4.15.0-62-generic/updates/dkms
, but modprobe
seems to look only into /lib/modules/4.15.0/
. I have already tried to create a symlink into the 4.15.0-directory, but modprobe
still is not able to locate the module file.
The Ubuntu Server was 'out of box', since I was renewing it. Is anyone who can help?
Closely reading the output of
sudo apt-get install wireguard
showed the following lines for me:Installed missing kernel headers via
sudo apt-get install linux-headers-$(uname -r)
.Then retry package installation via
sudo apt-get remove wireguard
followed byapt-get install wireguard
.Now
sudo modprobe wireguard
doesn't complain, andlsmod | grep wireguard
shows: