Score:0

Wireguard does not install on ubuntu 18.04.5

ng flag

I have seen there are many issues with installing wireguard on Ubuntu Server 18.04.5 LTS (and other versions), and I have tried several offered solutions, but the issue stays the same.

I did update and upgrade, next I install wireguard, and this is my output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
  linux-image-4.15.0-20-generic linux-modules-4.15.0-20-generic
wireguard is already the newest version (1.0.20200513-1~18.04.2).
The following packages were automatically installed and are no longer required:
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@\:/etc# dkms status

That is it, there is no more, I supposed to see output of wireguard installing, but it does not.

Should be an easy process, but it's not :)

Random Person avatar
us flag
Hey draft! I request you to go through this help center article: https://askubuntu.com/editing-help#code. BTW, I suggest you to go through the [tour] page.
us flag
The above excerpt shows that the `wireguard` _meta_ package has been installed. You'd need to check whether `dpkg --list | grep wireguard` also lists `wireguard-dkms` and `wireguard-tools`. If all of them have been installed properly (beginnings of all lines show "`ii`"), you should be able to follow instructions regarding the use of the `wg[-quick]` commands (cf. https://www.wireguard.com/quickstart/). If something does not work, check the output of `dkms status` (which you omitted above).
draft avatar
ng flag
Excuse me if i did reply in the wrong place, this site is new to me. When i use ```dpkg --list | grep wireguard``` it shows ```ii wireguard``` ```ii wireguard-dkms``` and ```ii wireguard-tools``` But when i use ```dkms-status``` i see : wireguard, 1.0.20201112, 5.4.0-81-generic, x86_64: installed (WARNING! Diff between built and installed module!) It seems the ```wireguard-dkms``` is different: ```1.0.20201112-1~18.04.1```. While the other 2 are: ```1.0.20200513-1~18.04.2``` I tried to install```wireguard-dkms``` manual, and this is the version which is installed?
draft avatar
ng flag
I have played around a bit now and it's a bit odd. When i install wireguard, ```wireguard-dkms``` is not installed. If i install ```wireguard-dkms``` manually, i get the output that wireguard installation is completed. But then there is no ```/etc/wireguard``` directory, where for example the pubkey and privkey are stored, so it will not work....
us flag
From the `dkms status` output you cited, one sees that you must have multiple kernel versions (you initially mentioned 4.15, but you also seem to use the `linux-hwe` 5.4 kernel). I use the latter on the last system w/ Ubuntu Bionic in conjunction w/ Wireguard myself (same package versions). The fact that you don't see a `/etc/wireguard` directory is very odd, though, because `dpkg -L wireguard-tools | grep /etc` will tell you that this is part of the `wireguard-tools` package. Try `apt-get --reinstall install wireguard wireguard-tools wireguard-dkms`, this should "re"create what's needed.
draft avatar
ng flag
Tnx @MarkusUeberall, ```apt-get --reinstall install wireguard wireguard-tools wireguard-dkms``` fixed it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.