[GH-ISSUE #9] Error on install Ubuntu 22.04 #6

Closed
opened 2026-10-13 21:04:55 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @VecH on GitHub (Jun 30, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/9

All packages are updated
Installed according to the instructions, with a couple of changes, but did not affect installation and operation.
I was running as root, so I skipped sudo
My installation steps:

apt install -y software-properties-common python3-launchpadlib gnupg2 linux-headers-generic
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 57290828
apt-key export 57290828 | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/amneziawg.gpg
apt-key --keyring /etc/apt/trusted.gpg del 57290828
echo "deb https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu jammy main" | tee -a /etc/apt/sources.list.d/amneziawg.list
echo "deb-src https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu jammy main" | tee -a /etc/apt/sources.list.d/amneziawg.list
apt-get update

I looked, the necessary headers are installed

# dpkg -l |grep linux-headers|grep `uname -r`
ii  linux-headers-5.15.0-113-generic       5.15.0-113.123                                    amd64        Linux kernel headers for version 5.15.0 on 64 bit x86 SMP
apt-get install -y amneziawg

When installing it shows an error, it cannot build the dkms module

# apt-get install -y amneziawg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  amneziawg-dkms amneziawg-tools
Suggested packages:
  openresolv | resolvconf
The following NEW packages will be installed:
  amneziawg amneziawg-dkms amneziawg-tools
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 397 kB of archives.
After this operation, 2,129 kB of additional disk space will be used.
Get:1 https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu jammy/main amd64 amneziawg-dkms all 1.0.0-0~202402131203+a37f499~ubuntu22.04.1 [290 kB]
Get:2 https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu jammy/main amd64 amneziawg-tools amd64 1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1 [98.3 kB]
Get:3 https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu jammy/main amd64 amneziawg all 1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1 [8,970 B]
Fetched 397 kB in 0s (942 kB/s)
Selecting previously unselected package amneziawg-dkms.
(Reading database ... 124261 files and directories currently installed.)
Preparing to unpack .../amneziawg-dkms_1.0.0-0~202402131203+a37f499~ubuntu22.04.1_all.deb ...
Unpacking amneziawg-dkms (1.0.0-0~202402131203+a37f499~ubuntu22.04.1) ...
Selecting previously unselected package amneziawg-tools.
Preparing to unpack .../amneziawg-tools_1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1_amd64.deb ...
Unpacking amneziawg-tools (1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1) ...
Selecting previously unselected package amneziawg.
Preparing to unpack .../amneziawg_1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1_all.deb ...
Unpacking amneziawg (1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1) ...
Setting up amneziawg-tools (1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1) ...
Setting up amneziawg-dkms (1.0.0-0~202402131203+a37f499~ubuntu22.04.1) ...
Loading new amneziawg-1.0.0 DKMS files...
Building for 5.15.0-113-generic
Building initial module for 5.15.0-113-generic
E: Unable to find a source package for linux
ls: cannot access '*/': No such file or directory
Error! Bad return status for module build on kernel: 5.15.0-113-generic (x86_64)
Consult /var/lib/dkms/amneziawg/1.0.0/build/make.log for more information.
dpkg: error processing package amneziawg-dkms (--configure):
 installed amneziawg-dkms package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of amneziawg:
 amneziawg depends on amneziawg-dkms (>= 0.0.20200121-2) | amneziawg-modules (>= 0.0.20191219); however:
  Package amneziawg-dkms is not configured yet.
  Package amneziawg-modules is not installed.

dpkg: error processing package amneziawg (--configure):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.10.2-1) ...No apport report written because the error message indicates its a followup error from a previous failure.

Errors were encountered while processing:
 amneziawg-dkms
 amneziawg
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@vps01:~# cat /var/crash/amneziawg-dkms.0.crash

ProblemType: Package
DKMSBuildLog:
 DKMS make.log for amneziawg-1.0.0 for kernel 5.15.0-113-generic (x86_64)
 Sun Jun 30 02:58:35 PM +09 2024
 make: Entering directory '/var/lib/dkms/amneziawg/1.0.0/build'
 Makefile:80: ***
 You're running a modern Linux Kernel (version 5.15.0-113-generic).

 In order to build AmneziaWG kernel module for this kernel you must obtain sources of your kernel
 by yourself and make a symlink to them into this directory:

     ln -s <path to kernel sources> kernel

 After that please run make script again.  Stop.
 make: Leaving directory '/var/lib/dkms/amneziawg/1.0.0/build'
DKMSKernelVersion: 5.15.0-113-generic
Date: Sun Jun 30 14:58:36 2024
Package: amneziawg-dkms 1.0.0-0~202402131203+a37f499~ubuntu22.04.1
PackageVersion: 1.0.0-0~202402131203+a37f499~ubuntu22.04.1
SourcePackage: amneziawg-linux-kmod
Title: amneziawg-dkms 1.0.0-0~202402131203+a37f499~ubuntu22.04.1: amneziawg kernel module failed to build

# cat /var/lib/dkms/amneziawg/1.0.0/build/make.log

DKMS make.log for amneziawg-1.0.0 for kernel 5.15.0-113-generic (x86_64)
Sun Jun 30 03:07:39 PM +09 2024
make: Entering directory '/var/lib/dkms/amneziawg/1.0.0/build'
Makefile:80: ***
You're running a modern Linux Kernel (version 5.15.0-113-generic).

In order to build AmneziaWG kernel module for this kernel you must obtain sources of your kernel
by yourself and make a symlink to them into this directory:

    ln -s <path to kernel sources> kernel

After that please run make script again.  Stop.
make: Leaving directory '/var/lib/dkms/amneziawg/1.0.0/build'
Originally created by @VecH on GitHub (Jun 30, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/9 All packages are updated Installed according to the instructions, with a couple of changes, but did not affect installation and operation. I was running as root, so I skipped sudo My installation steps: ``` apt install -y software-properties-common python3-launchpadlib gnupg2 linux-headers-generic apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 57290828 apt-key export 57290828 | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/amneziawg.gpg apt-key --keyring /etc/apt/trusted.gpg del 57290828 echo "deb https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu jammy main" | tee -a /etc/apt/sources.list.d/amneziawg.list echo "deb-src https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu jammy main" | tee -a /etc/apt/sources.list.d/amneziawg.list apt-get update ``` I looked, the necessary headers are installed ``` # dpkg -l |grep linux-headers|grep `uname -r` ii linux-headers-5.15.0-113-generic 5.15.0-113.123 amd64 Linux kernel headers for version 5.15.0 on 64 bit x86 SMP ``` ``` apt-get install -y amneziawg ``` When installing it shows an error, it cannot build the dkms module ``` # apt-get install -y amneziawg Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: amneziawg-dkms amneziawg-tools Suggested packages: openresolv | resolvconf The following NEW packages will be installed: amneziawg amneziawg-dkms amneziawg-tools 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 397 kB of archives. After this operation, 2,129 kB of additional disk space will be used. Get:1 https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu jammy/main amd64 amneziawg-dkms all 1.0.0-0~202402131203+a37f499~ubuntu22.04.1 [290 kB] Get:2 https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu jammy/main amd64 amneziawg-tools amd64 1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1 [98.3 kB] Get:3 https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu jammy/main amd64 amneziawg all 1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1 [8,970 B] Fetched 397 kB in 0s (942 kB/s) Selecting previously unselected package amneziawg-dkms. (Reading database ... 124261 files and directories currently installed.) Preparing to unpack .../amneziawg-dkms_1.0.0-0~202402131203+a37f499~ubuntu22.04.1_all.deb ... Unpacking amneziawg-dkms (1.0.0-0~202402131203+a37f499~ubuntu22.04.1) ... Selecting previously unselected package amneziawg-tools. Preparing to unpack .../amneziawg-tools_1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1_amd64.deb ... Unpacking amneziawg-tools (1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1) ... Selecting previously unselected package amneziawg. Preparing to unpack .../amneziawg_1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1_all.deb ... Unpacking amneziawg (1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1) ... Setting up amneziawg-tools (1.0.20210914-0~202405062019+e42813c~ubuntu22.04.1) ... Setting up amneziawg-dkms (1.0.0-0~202402131203+a37f499~ubuntu22.04.1) ... Loading new amneziawg-1.0.0 DKMS files... Building for 5.15.0-113-generic Building initial module for 5.15.0-113-generic E: Unable to find a source package for linux ls: cannot access '*/': No such file or directory Error! Bad return status for module build on kernel: 5.15.0-113-generic (x86_64) Consult /var/lib/dkms/amneziawg/1.0.0/build/make.log for more information. dpkg: error processing package amneziawg-dkms (--configure): installed amneziawg-dkms package post-installation script subprocess returned error exit status 10 dpkg: dependency problems prevent configuration of amneziawg: amneziawg depends on amneziawg-dkms (>= 0.0.20200121-2) | amneziawg-modules (>= 0.0.20191219); however: Package amneziawg-dkms is not configured yet. Package amneziawg-modules is not installed. dpkg: error processing package amneziawg (--configure): dependency problems - leaving unconfigured Processing triggers for man-db (2.10.2-1) ...No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: amneziawg-dkms amneziawg needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) ``` ```root@vps01:~# cat /var/crash/amneziawg-dkms.0.crash``` ``` ProblemType: Package DKMSBuildLog: DKMS make.log for amneziawg-1.0.0 for kernel 5.15.0-113-generic (x86_64) Sun Jun 30 02:58:35 PM +09 2024 make: Entering directory '/var/lib/dkms/amneziawg/1.0.0/build' Makefile:80: *** You're running a modern Linux Kernel (version 5.15.0-113-generic). In order to build AmneziaWG kernel module for this kernel you must obtain sources of your kernel by yourself and make a symlink to them into this directory: ln -s <path to kernel sources> kernel After that please run make script again. Stop. make: Leaving directory '/var/lib/dkms/amneziawg/1.0.0/build' DKMSKernelVersion: 5.15.0-113-generic Date: Sun Jun 30 14:58:36 2024 Package: amneziawg-dkms 1.0.0-0~202402131203+a37f499~ubuntu22.04.1 PackageVersion: 1.0.0-0~202402131203+a37f499~ubuntu22.04.1 SourcePackage: amneziawg-linux-kmod Title: amneziawg-dkms 1.0.0-0~202402131203+a37f499~ubuntu22.04.1: amneziawg kernel module failed to build ``` ```# cat /var/lib/dkms/amneziawg/1.0.0/build/make.log``` ``` DKMS make.log for amneziawg-1.0.0 for kernel 5.15.0-113-generic (x86_64) Sun Jun 30 03:07:39 PM +09 2024 make: Entering directory '/var/lib/dkms/amneziawg/1.0.0/build' Makefile:80: *** You're running a modern Linux Kernel (version 5.15.0-113-generic). In order to build AmneziaWG kernel module for this kernel you must obtain sources of your kernel by yourself and make a symlink to them into this directory: ln -s <path to kernel sources> kernel After that please run make script again. Stop. make: Leaving directory '/var/lib/dkms/amneziawg/1.0.0/build' ```
Author
Owner

@agentsib commented on GitHub (Jul 1, 2024):

Please check

Ensure that you have source repositories configured for APT - run vi /etc/apt/sources.list and make sure that there is at least one line starting with deb-src is present and uncommented.

<!-- gh-comment-id:2199534647 --> @agentsib commented on GitHub (Jul 1, 2024): Please check > Ensure that you have source repositories configured for APT - run vi /etc/apt/sources.list and make sure that there is at least one line starting with deb-src is present and uncommented.
Author
Owner

@VecH commented on GitHub (Jul 1, 2024):

Yes, yesterday I uncommented deb-src and everything worked

<!-- gh-comment-id:2199543872 --> @VecH commented on GitHub (Jul 1, 2024): Yes, yesterday I uncommented deb-src and everything worked
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#6
No description provided.