File: /var/lib/dkms/sgx/1.36.2/source/dkms.conf does not exist

242 views Asked by At

I am going to install dcap on my vm with kernel : Linux version 5.15.0-1029-azure (buildd@lcy02-amd64-076) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #36~20.04.1-Ubuntu SMP Tue Dec 6 17:00:26 UTC 2022 I tried the command sudo apt-get install libsgx-dcap-quote-verify-dev but I get error :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libsgx-dcap-quote-verify-dev is already the newest version (1.15.100.3-focal1).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
5 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 linux-headers-5.15.0-1029-azure (5.15.0-1029.36~20.04.1) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-1029-azure
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/sgx/1.36.2/source/dkms.conf does not exist.
   ...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
dpkg: error processing package linux-headers-5.15.0-1029-azure (--configure):
 installed linux-headers-5.15.0-1029-azure package post-installation script subprocess returned error exit status 1
Setting up linux-image-5.15.0-1029-azure (5.15.0-1029.36~20.04.1) ...
Setting up linux-headers-5.4.0-135-generic (5.4.0-135.152) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.0-135-generic
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/sgx/1.36.2/source/dkms.conf does not exist.
   ...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
dpkg: error processing package linux-headers-5.4.0-135-generic (--configure):
 installed linux-headers-5.4.0-135-generic package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-headers-azure:
 linux-headers-azure depends on linux-headers-5.15.0-1029-azure; however:
  Package linux-headers-5.15.0-1029-azure is not configured yet.

dpkg: error processing package linux-headers-azure (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-azure:No apport report written because the error message indicates its a followup error from a previous failure.

 linux-azure depends on linux-headers-azure (= 5.15.0.1029.36~20.04.19); however:
  Package linux-headers-azure is not configured yet.

dpkg: error processing package linux-azure (--configure):
 dependency problems - leaving unconfigured
Processing triggers for linux-image-5.15.0-1029-azure (5.15.0-1029.36~20.04.1) ...No apport report written because MaxReports is reached already

/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-1029-azure
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/sgx/1.36.2/source/dkms.conf does not exist.
   ...fail!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-5.15.0-1029-azure (--configure):
 installed linux-image-5.15.0-1029-azure package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-headers-5.15.0-1029-azure
 linux-headers-5.4.0-135-generic
 linux-headers-azure
 linux-azure
 linux-image-5.15.0-1029-azure
E: Sub-process /usr/bin/dpkg returned an error code (1)

I think the main error comes from /var/lib/dkms/sgx/1.36.2/source/dkms.conf does not exist. I have no idea why this error occurs. Do you have any solution for it?

1

There are 1 answers

0
Tolis M. On

I came across the same error a while ago. For me, removing dkms and reinstalling it worked.

Just execute:

sudo apt autoremove dkms
sudo apt install dkms

Hope this helps.