Score:1

Getting an error every time I install something with apt

bo flag

I used this command on ubuntu cinnamon 23.04

sudo apt install gcc

It gave me this output

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gcc is already the newest version (4:12.2.0-3ubuntu1).
gcc set to manually installed.
The following packages were automatically installed and are no longer required:
  fortune-mod fortunes-min gir1.2-gexiv2-0.10 librecode0 python3-configobj
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up xtrx-dkms (0.0.1+git20190320.5ae3a3e-3.2) ...
Removing old xtrx-0.0.1+git20190320.5ae3a3e-3.2 DKMS files...
Module xtrx-0.0.1+git20190320.5ae3a3e-3.2 for kernel 6.2.0-20-generic (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.

xtrx.ko:
 - Uninstallation
   - Deleting from: /lib/modules/6.2.0-20-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.
depmod...
Deleting module xtrx-0.0.1+git20190320.5ae3a3e-3.2 completely from the DKMS tree
.
Loading new xtrx-0.0.1+git20190320.5ae3a3e-3.2 DKMS files...
Building for 6.2.0-20-generic 6.3.2-060302-generic
Building initial module for 6.2.0-20-generic
Done.

xtrx.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.2.0-20-generic/updates/dkms/
depmod...
Building initial module for 6.3.2-060302-generic
ERROR (dkms apport): kernel package linux-headers-6.3.2-060302-generic is not su
pported
Error! Bad return status for module build on kernel: 6.3.2-060302-generic (x86_6
4)
Consult /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build/make.log for more
 information.
dpkg: error processing package xtrx-dkms (--configure):
 installed xtrx-dkms package post-installation script subprocess returned error 
exit status 10
Errors were encountered while processing:
 xtrx-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

Content of /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build/make.log

DKMS make.log for xtrx-0.0.1+git20190320.5ae3a3e-3.2 for kernel 6.3.2-060302-generic (x86_64)
Mo 29 Mai 2023 12:56:35 CEST
make: Entering directory '/usr/src/linux-headers-6.3.2-060302-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-17ubuntu1) 12.2.0
  You are using:           gcc-12 (Ubuntu 12.2.0-17ubuntu1) 12.2.0
  CC [M]  /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build/xtrx.o
/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build/xtrx.c: In function ‘xtrxfd_mmap’:
/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build/xtrx.c:1075:31: error: assignment of read-only member ‘vm_flags’
 1075 |                 vma->vm_flags |= VM_LOCKED;
      |                               ^~
/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build/xtrx.c:1090:31: error: assignment of read-only member ‘vm_flags’
 1090 |                 vma->vm_flags |= VM_IO;
      |                               ^~
/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build/xtrx.c:1115:31: error: assignment of read-only member ‘vm_flags’
 1115 |                 vma->vm_flags |= VM_LOCKED;
      |                               ^~
make[1]: *** [scripts/Makefile.build:252: /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build/xtrx.o] Error 1
make: *** [Makefile:2031: /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.3.2-060302-generic'
vidarlo avatar
om flag
What's the content of `/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build/make.log`?
Longlost avatar
bo flag
Edited my original question
Score:0
in flag

Dou you need xtrx-dkms package? xtrx kernel module needs to be built for all kernels that you have installed. If you do not need it remove it with apt remove xtrx-dkms. Then you should be able to use apt.

According to the output, the package xtrx is successfully built for kernel 6.2.0-20, but it fails for kernel 6.3.2-060302. You could remove the module just for 6.3.2-060302, but I am not sure how would that work with next apt upgrade. You can try something like dkms remove -m xtrx -k 6.3.2-060302-generic. I have probably missed some details in the command. Try dkms status to see module's details.

Longlost avatar
bo flag
`apt remove xtrx-dkms` worked for me, thank you for the help
mpboden avatar
do flag
@Longlost If this answer solved your problem, please click the check mark to indicate that.
I sit in a Tesla and translated this thread with Ai:

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.