Error could not locate dkms conf file

During a recent apt-get dist-upgrade of 12.10 I received the following error: Setting up linux-headers-3.5.0-19-generic (3.5.0-19.30) ... Examining /etc/kernel/header_postinst.d. run-parts: execut...

I’ve been getting that on kernel upgrades for a while, with the result that not all of my dkms drivers get updated on kernel-upgrades.

Firstly I was able to workaround the problem by reconfiguring any packages that used dkms to force them to be recompiled for the current kernel — eg it was my AMD video drivers that failed (package == fglrx):

sudo dpkg-reconfigure fglrx

That would at least get the drivers configured for the current version.

Finally I found this bug, which includes some steps you can use to diagnose: https://bugs.launchpad.net/ubuntu/+source/dkms/+bug/830915

dkms status
ls -R /var/lib/dkms

Basically what they’re doing is looking around for anything that is surprising, or unexpected — eg packages you have uninstalled — or software you have manually installed on an earlier ubuntu version and may not work with the newer version. Particularly check the date-stamp on the directories which might show you particularly old packages could be from manually installed packages.

ls -l /var/lib/dkms

In my case I had an old version of the fglrx install I had used to diagnose some problems a year ago and had simply re-named it. Deleting this old cruft made the problem go away.

If there’s junk delete it (or move it out of that directory) — if there’s a manually installed package there, consider updating it, or uninstalling it and using the maintained version.

#1 2012-11-01 18:36:58

PL_kolek
Member
Registered: 2012-02-21
Posts: 41

[SOLVED]DKMS — could not locate dkms.conf file

Hello!
When I try to reinstall modules for new kernel, I get this:

sudo dkms autoinstall 
Error! Could not locate dkms.conf file.
File:  does not exist.

For example I cannot switch my GPU because bbswitch didn’t get autoinstalled for the new kernel. I have to manually do:

sudo dkms build bbswitch/0.5

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.6.4-1-ARCH KVERSION=3.6.4-1-ARCH.....
cleaning build area....

DKMS: build completed.

And then:

sudo dkms install bbswitch/0.5

bbswitch:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /usr/lib/modules/3.6.4-1-ARCH/kernel/drivers/acpi/

depmod.......

DKMS: install completed.

I guess the same follows for my nvidia-drivers? I think DKMS should do this on its own, but I’m not sure if missing dkms.conf is related.

Last edited by PL_kolek (2012-11-07 21:27:38)

#2 2012-11-04 19:56:26

PL_kolek
Member
Registered: 2012-02-21
Posts: 41

Re: [SOLVED]DKMS — could not locate dkms.conf file

BUMP
New kernel — situation recurred. Has anyone any idea what might be going on?

DKMS hasn’t installed nvidia either…

Last edited by PL_kolek (2012-11-04 20:11:20)

#3 2012-11-07 12:07:06

Alucryd
Developer
From: France
Registered: 2011-05-07
Posts: 110
Website

Re: [SOLVED]DKMS — could not locate dkms.conf file

Same here on one of my machines. The other 2 are fine though, still haven’t figured out what’s going wrong. Fresh installing seems to fix the problem though.


The bird of Hermes is my name, eating my wings to make me tame.

#4 2012-11-07 13:23:53

Alucryd
Developer
From: France
Registered: 2011-05-07
Posts: 110
Website

Re: [SOLVED]DKMS — could not locate dkms.conf file

Okay found out what was wrong, look here for the answer: http://8thstring.blogspot.fr/2012/01/er … -file.html


The bird of Hermes is my name, eating my wings to make me tame.

#5 2012-11-07 16:40:30

PL_kolek
Member
Registered: 2012-02-21
Posts: 41

Re: [SOLVED]DKMS — could not locate dkms.conf file

Thanks for the answer. I found this post before, but ignored it, because I didn’t have virtualbox installed (had to install it yesterday though). I followed the advice there and removed all directories corresponding to old version of my modules. No betterment:

sudo dkms autoinstall 
[sudo] password for mk: 
Error! Could not locate dkms.conf file.
File:  does not exist.

#6 2012-11-07 17:50:33

Lekensteyn
Member
From: Netherlands
Registered: 2012-06-19
Posts: 192
Website

Re: [SOLVED]DKMS — could not locate dkms.conf file

Use the following to find out your lone DKMS packages

for i in /var/lib/dkms/*/[^k]*/source; do [ -e "$i" ] || echo "$i";done

It will probably print out /var/lib/dkms/bbswitch/0.4.2/source. In that case, remove /var/lib/dkms/bbswitch/0.4.2.

There was an error in older .install scripts (due to a libalpm bug) that prevented older versions to be uninstalled first.

#7 2012-11-07 18:35:22

PL_kolek
Member
Registered: 2012-02-21
Posts: 41

Re: [SOLVED]DKMS — could not locate dkms.conf file

Sorry for not being able to check your solution, because I fixed it in my way. Dumb way. I uninstalled dmks and dkms-bbswitch, removed /var/lib/dkms and installed it again. No strange errors now.

But I removed /var/lib/dkms/bbswitch/0.4.2 before, and it didn’t help. But probably I did something wrong. Thanks

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

Comments

@danithechief

I have this error:

Error! Could not locate dkms.conf file.
File: does not exist.

someone can help plz?

Installing rtl8812au-5.9.3.2
Copying source files to: /usr/src/rtl8812au-5.9.3.2
Copying 8812au.conf to: /etc/modprobe.d
Error! DKMS tree already contains: rtl8812au-5.9.3.2
You cannot add the same module/version combo more than once.
An error occurred while running: dkms add : 3
Removing 8812au.conf from: /etc/modprobe.d
Removing source files from: /usr/src/rtl8812au-5.9.3.2
Cleanup complete
dkms status:
8812au, 150821: added
Error! Could not locate dkms.conf file.
File: does not exist.

its a zorin machine (Ubuntu 18 i think)

@morrownr

Run:

$ sudo ./remove-driver.sh

and then follow the installation instructions again.

The driver was already installed when you tried to install it. I’m not sure how that came about but I will look into reworking the installation script logic.

@danithechief

@morrownr

I have reworked and tested a new version of the installation script. It should prevent inadvertent installation attempts over previous installations.

@morrownr
morrownr

changed the title
Error! Could not locate dkms.conf file. File: does not exist.

(solved) Error! Could not locate dkms.conf file. File: does not exist.

Mar 27, 2021

@danithechief

2 participants

@morrownr

@danithechief

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

grimy1928

Update kernel via terminal gives «Could not locate dkms.conf»

I am running the command to update Mint through the terminal which is:
sudo apt-get update && sudo apt-get dist-upgrade -y.
However, when I run it I get this error at the end and I don’t know why. Any help would be massively appreciated. Thank you.
https://hastebin.com/vipokisomu.sql

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

JeremyB

Level 21
Level 21
Posts: 12628
Joined: Fri Feb 21, 2014 8:17 am

grimy1928

Re: Update kernel via terminal gives «Could not locate dkms.conf»

Post

by grimy1928 » Sun Jun 18, 2017 3:13 pm

Here you go, cheers.
grimy1928@Adam-SATELLITE-C50D-A-12V ~ $ dkms status; history | grep dkms
Error! Could not locate dkms.conf file.
File: does not exist.
500 dkms status; history | grep dkms
grimy1928@Adam-SATELLITE-C50D-A-12V ~ $

grimy1928

Re: Update kernel via terminal gives «Could not locate dkms.conf»

Post

by grimy1928 » Sun Jun 18, 2017 3:56 pm

Here’s the output:
grimy1928@Adam-SATELLITE-C50D-A-12V ~ $ ls /var/lib/dkms
anbox-modules-ashmem anbox-modules-binder dkms_dbversion ndiswrapper
grimy1928@Adam-SATELLITE-C50D-A-12V ~ $ ls /var/lib/dkms; ls /usr/src; cat /etc/modprobe.d/dkms.conf
anbox-modules-ashmem anbox-modules-binder dkms_dbversion ndiswrapper
anbox-modules-ashmem-7~xenial1 linux-headers-4.4.0-75-generic
anbox-modules-binder-7~xenial1 linux-headers-4.4.0-79
linux-headers-4.4.0-53 linux-headers-4.4.0-79-generic
linux-headers-4.4.0-53-generic ndiswrapper-1.60
linux-headers-4.4.0-75 vboxhost-5.1.22
# modprobe information used for DKMS modules
#
# This is a stub file, should be edited when needed,
# used by default by DKMS.
grimy1928@Adam-SATELLITE-C50D-A-12V ~ $

JeremyB

Level 21
Level 21
Posts: 12628
Joined: Fri Feb 21, 2014 8:17 am

grimy1928

Re: Update kernel via terminal gives «Could not locate dkms.conf»

Post

by grimy1928 » Sun Jun 18, 2017 4:57 pm

grimy1928@Adam-SATELLITE-C50D-A-12V ~ $ locate dkms.conf
/etc/modprobe.d/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/etc/modprobe.d/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/usr/src/anbox-modules-ashmem-6~xenial1/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/usr/src/anbox-modules-binder-6~xenial1/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/usr/src/ndiswrapper-1.60/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/var/lib/dkms/anbox-modules-ashmem/4~xenial1/build/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/var/lib/dkms/anbox-modules-ashmem/4~xenial1/build/ashmem/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/var/lib/dkms/anbox-modules-ashmem/6~xenial1/build/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/var/lib/dkms/anbox-modules-binder/4~xenial1/build/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/var/lib/dkms/anbox-modules-binder/4~xenial1/build/binder/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/var/lib/dkms/anbox-modules-binder/6~xenial1/build/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/var/lib/dkms/ndiswrapper/1.60/build/dkms.conf
/timeshift/snapshots/2017-06-09_16-00-02/localhost/var/lib/dpkg/info/anbox-modules-dkms.conffiles
/timeshift/snapshots/2017-06-09_16-00-02/localhost/var/lib/dpkg/info/dkms.conffiles
/timeshift/snapshots/2017-06-16_16-00-02/localhost/etc/modprobe.d/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/usr/src/anbox-modules-ashmem-7~xenial1/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/usr/src/anbox-modules-binder-7~xenial1/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/usr/src/ndiswrapper-1.60/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/var/lib/dkms/anbox-modules-ashmem/4~xenial1/build/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/var/lib/dkms/anbox-modules-ashmem/4~xenial1/build/ashmem/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/var/lib/dkms/anbox-modules-ashmem/6~xenial1/build/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/var/lib/dkms/anbox-modules-ashmem/7~xenial1/build/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/var/lib/dkms/anbox-modules-binder/4~xenial1/build/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/var/lib/dkms/anbox-modules-binder/4~xenial1/build/binder/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/var/lib/dkms/anbox-modules-binder/6~xenial1/build/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/var/lib/dkms/anbox-modules-binder/7~xenial1/build/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/var/lib/dkms/ndiswrapper/1.60/build/dkms.conf
/timeshift/snapshots/2017-06-16_16-00-02/localhost/var/lib/dpkg/info/anbox-modules-dkms.conffiles
/timeshift/snapshots/2017-06-16_16-00-02/localhost/var/lib/dpkg/info/dkms.conffiles
/usr/src/anbox-modules-ashmem-7~xenial1/dkms.conf
/usr/src/anbox-modules-binder-7~xenial1/dkms.conf
/usr/src/ndiswrapper-1.60/dkms.conf
/var/lib/dkms/anbox-modules-ashmem/4~xenial1/build/dkms.conf
/var/lib/dkms/anbox-modules-ashmem/4~xenial1/build/ashmem/dkms.conf
/var/lib/dkms/anbox-modules-ashmem/6~xenial1/build/dkms.conf
/var/lib/dkms/anbox-modules-ashmem/7~xenial1/build/dkms.conf
/var/lib/dkms/anbox-modules-binder/4~xenial1/build/dkms.conf
/var/lib/dkms/anbox-modules-binder/4~xenial1/build/binder/dkms.conf
/var/lib/dkms/anbox-modules-binder/6~xenial1/build/dkms.conf
/var/lib/dkms/anbox-modules-binder/7~xenial1/build/dkms.conf
/var/lib/dkms/ndiswrapper/1.60/build/dkms.conf
/var/lib/dpkg/info/anbox-modules-dkms.conffiles
/var/lib/dpkg/info/dkms.conffiles
grimy1928@Adam-SATELLITE-C50D-A-12V ~ $

grimy1928

Re: Update kernel via terminal gives «Could not locate dkms.conf»

Post

by grimy1928 » Sun Jun 18, 2017 5:19 pm

Yes but only since today and I’m running Kali Linux on it only.
grimy1928@Adam-SATELLITE-C50D-A-12V ~ $ ls /usr/src/vboxhost-5.1.22
build_in_tmp Makefile vboxdrv vboxnetadp vboxnetflt vboxpci
grimy1928@Adam-SATELLITE-C50D-A-12V ~ $

JeremyB

Level 21
Level 21
Posts: 12628
Joined: Fri Feb 21, 2014 8:17 am

grimy1928

Re: Update kernel via terminal gives «Could not locate dkms.conf»

Post

by grimy1928 » Mon Jun 19, 2017 5:43 pm

JeremyB wrote:Post results for

Here

Code: Select all

grimy1928@Adam-SATELLITE-C50D-A-12V ~ $ dpkg -l | grep dkms
ii  anbox-modules-dkms                                          7~xenial1                                    all          Android kernel driver (binder, ashmem) in DKMS format.
ii  bbswitch-dkms                                               0.8-3ubuntu1                                 amd64        Interface for toggling the power on NVIDIA Optimus video cards
ii  dkms                                                        2.2.0.3-2ubuntu11.3                          all          Dynamic Kernel Module Support Framework
ii  ndiswrapper-dkms                                            1.60-3~ubuntu16.04.1                         all          Source for the ndiswrapper Linux kernel module (DKMS)
grimy1928@Adam-SATELLITE-C50D-A-12V ~ $ 

This bug affects 74 people

Affects Status Importance Assigned to Milestone


dkms (Ubuntu)

Incomplete

High


Unassigned

Bug Description

Настраивается пакет linux-image-3.0.0-9-generic (3.0.0-9.12) …
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 3.0.0-9-generic /boot/vmlinuz-3.0.0-9-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.0.0-9-generic /boot/vmlinuz-3.0.0-9-generic
update-initramfs: Generating /boot/initrd.img-3.0.0-9-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.0.0-9-generic /boot/vmlinuz-3.0.0-9-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.0.0-9-generic /boot/vmlinuz-3.0.0-9-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.0.0-9-generic /boot/vmlinuz-3.0.0-9-generic
Generating grub.cfg …
Found linux image: /boot/vmlinuz-3.0.0-9-generic
Found initrd image: /boot/initrd.img-3.0.0-9-generic
Found linux image: /boot/vmlinuz-3.0.0-8-generic
Found initrd image: /boot/initrd.img-3.0.0-8-generic
Found linux image: /boot/vmlinuz-2.6.38-10-generic
Found initrd image: /boot/initrd.img-2.6.38-10-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Ubuntu Natty (development branch) (11.04) on /dev/sdb5
done

This, however, doesn’t seem to be fatal.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: dkms 2.2.0.2-1
ProcVersionSignature: Ubuntu 3.0.0-8.11-generic 3.0.1
Uname: Linux 3.0.0-8-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Mon Aug 22 12:43:31 2011
InstallationMedia: Xubuntu 10.10 «Maverick Meerkat» — Release amd64 (20101008.1)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 LANG=ru_RU.UTF-8
 SHELL=/bin/bash
SourcePackage: dkms
UpgradeStatus: Upgraded to oneiric on 2011-08-10 (11 days ago)

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • Installation & Upgrades
  • [server] Error! Could not locate dkms.conf file.

  1. Error! Could not locate dkms.conf file.

    Code:

    Setting up linux-headers-4.15.0-47-generic (4.15.0-47.50) ...
    /etc/kernel/header_postinst.d/dkms:
    Error! Could not locate dkms.conf file.
    File:  does not exist.
    run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
    dpkg: error processing package linux-headers-4.15.0-47-generic (--configure):
     installed linux-headers-4.15.0-47-generic package post-installation script subprocess returned error exit status 1
    dpkg: dependency problems prevent configuration of linux-headers-generic:
     linux-headers-generic depends on linux-headers-4.15.0-47-generic; however:
    No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                                Package linux-headers-4.15.0-47-generic is not configured yet.
    
    dpkg: error processing package linux-headers-generic (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of linux-generic:
     linux-generic depends on linux-headers-generic (= 4.15.0.47.49); however:
      Package linux-headers-generic is not configured yet.
    
    dpkg: error processing package linux-generic (--configure):
     dependency problems - leaving unconfigured
    Processing triggers for linux-image-4.15.0-47-generic (4.15.0-47.50) ...
    No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                              /etc/kernel/postinst.d/dkms:
    Error! Could not locate dkms.conf file.
    File:  does not exist.
    run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
    dpkg: error processing package linux-image-4.15.0-47-generic (--configure):
     installed linux-image-4.15.0-47-generic 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-4.15.0-47-generic
     linux-headers-generic
     linux-generic
     linux-image-4.15.0-47-generic
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    on a simple update


  2. Re: Error! Could not locate dkms.conf file.

    I am receiving an identical error — had to boot the prior kernel version (.46) to get a working machine.
    Do you have the Nvidia proprietary drivers installed, by chance? That’s the only thing that dkms status lists for me.


  3. Re: Error! Could not locate dkms.conf file.

    Quote Originally Posted by chlorus
    View Post

    I am receiving an identical error — had to boot the prior kernel version (.46) to get a working machine.
    Do you have the Nvidia proprietary drivers installed, by chance? That’s the only thing that dkms status lists for me.

    nope no nvidia, was virtual box, rm dkms and virtualbox update and then install dkms and vb again


  4. Re: Error! Could not locate dkms.conf file.

    let me bump this again because i got this crap again


Bookmarks

Bookmarks


Posting Permissions

Понравилась статья? Поделить с друзьями:
  • Error could not locate a flask application
  • Error could not load video
  • Error could not load ux0 data gtasa libgtasa so
  • Error could not load ux0 data gta sa libgtasa so
  • Error could not load logging rules