Error during kernel upgrade: Could not locate dkms.conf file

Bug #830915 reported by Dmitry Tantsur
350
This bug affects 75 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)

Revision history for this message
Dmitry Tantsur (divius) wrote :
Changed in dkms (Ubuntu):
status: New → Confirmed
Revision history for this message
Vicenç Juan Tomàs (vtomasr5) wrote :

The same happens to me with linux-image-3.0.0-11-generic version.

Revision history for this message
Compizfox (compizfox) wrote :

Got the same error when installing the kernel headers for 3.0.0-12.

Revision history for this message
chrysoberyl (lnxme1) wrote :

Got the same error while upgrading linux-generic 3.0.0.12.14 to 3.0.0.13.15

Revision history for this message
Mario Limonciello (superm1) wrote :

Someone with this problem, can you please add the following details:

* dkms status
* ls /var/lib/dkms -R

It sounds like some package was not properly cleaning up, most likely not DKMS's fault directly.

Revision history for this message
Jani Uusitalo (uusijani) wrote :

Mario, here's output from the commands you asked.

Revision history for this message
Beto1917 (beto-mst) wrote :

also affects me, running 3.2.0.5.5

Revision history for this message
iwtctw (avalonofsaber) wrote :

same to me, it happens every time where building module with kernel

output of "dkms status":
blcr, 0.8.2: added
fglrx-updates, 8.911, 3.0.0-16-generic, i686: installedError! Could not locate dkms.conf file.
File: does not exist.

output of "ls /var/lib/dkms -R" is attached

Revision history for this message
Christian Assig (chrassig) wrote :

This looks like a bug in the virtualbox package you have installed.

Go to the directory /var/lib/dkms/vboxhost, and make sure to delete any directories belonging to previous versions of virtualbox that you no longer have installed.

@iwtctw (avalonofsaber): Delete /var/lib/dkms/vboxhost/4.0.8/
@Jani Uusitalo (uusijani): Delete /var/lib/dkms/vboxhost/4.1.4/

Or have a look at the following page for more details:
http://8thstring.blogspot.com/2012/01/error-could-not-locate-dkmsconf-file.html

Revision history for this message
Christian Assig (chrassig) wrote :

If you have installed virtualbox from virtualbox.org instead of the version from the official Ubuntu repositories, this upstream bug about the same topic might also be of interest for you:
https://www.virtualbox.org/ticket/7536

Revision history for this message
Teo (teo1978) wrote :

I have the same issue and I don't see any subdirectory belonging to older versions of VB in /var/lib/dkms/vboxhost

/var/lib/dkms/vboxhost$ ls -la
total 12
drwxr-xr-x 3 root root 4096 May 23 20:07 .
drwxr-xr-x 7 root root 4096 May 23 20:06 ..
drwxr-xr-x 4 root root 4096 May 23 20:07 4.1.14
lrwxrwxrwx 1 root root 28 May 23 20:07 kernel-3.2.0-24-generic-i686 -> 4.1.14/3.2.0-24-generic/i686

So VirtualBox developer say it's a bug in Ubuntu, and Ubuntu developers say it's a bug in VirtualBox..........

Revision history for this message
Nick Jenkins (nickpj) wrote :

You might have some other directories left over from an old version of virtualbox under /var/lib/dkms/ . For example, I had some directories left over from 3.2.6, and the fix for me was:

sudo rm -r /var/lib/dkms/vboxnetadp /var/lib/dkms/vboxdrv /var/lib/dkms/vboxnetflt

Basically you should check the timestamps of any directories under /var/lib/dkms that start with either 'vbox' or 'virtual'. If they're fairly old (e.g. > 1 year) then there's a reasonable chance that they might be cruft left over from an old version of VirtualBox. Deciding whether to delete them or not is at your discretion.

And really, there are 2 entirely separate software problems here:
1) VirtualBox should clean up after itself by removing these old directories when being uninstalled or upgraded.
2) dkms should be explicit and unambiguous about which directory it has a problem with. For example there would be a LOT less confusion all round if it said "Error in directory /var/lib/dkms/vboxdrv , belonging to package 'virtualbox' - Could not locate dkms.conf file." instead of the completely non-specific: "Error! Could not locate dkms.conf file."

Revision history for this message
Guntbert Reiter (guntbert) wrote :

@Nick Jenkins (nickpi)
That was a much needed clarification, thx - might it be a good idea to create a new bug against dkms just with your item (2) ? (and maybe the virtualbox issue as an example)

LAZA (laza74)
tags: added: precise
Revision history for this message
unksi (unksi) wrote :

Happens with quantal too:

run-parts: executing /etc/kernel/postinst.d/dkms 3.5.0-26-generic /boot/vmlinuz-3.5.0-26-generic
Error! Could not locate dkms.conf file.
File: does not exist.

tags: added: quantal
Revision history for this message
mrDoctorWho (mrdoctorwho) wrote :

Happens with raring (system was updated by update-manager 12.10→13.04):

run-parts: executing /etc/kernel/header_postinst.d/dkms 3.8.0-17-generic /boot/vmlinuz-3.8.0-17-generic
Error! Could not locate dkms.conf file.
File: does not exist.

Revision history for this message
jimav (james-avera) wrote :

(work around)
This cleared the error for me:

  sudo apt-get remove virtualbox-4.2
  sudo rm -rf /var/lib/dkms/vboxhost
  sudo apt-get install virtualbox-4.2

Revision history for this message
leet_linux_user (christopher-lemire) wrote :

Wow! This bug was reported in 2011 and still occuring.

Revision history for this message
Ro$k0 (kroskolii) wrote :

Yeah. And this is not "wow" at all. Same bug on 13.04 x32.

tags: added: raring
Revision history for this message
Laurynas Riliskis (laurynas-riliskis-gmail) wrote :

The bug is BACK!

Setting up linux-image-3.8.0-31-generic (3.8.0-31.46) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.8.0-31-generic /boot/vmlinuz-3.8.0-31-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.8.0-31-generic /boot/vmlinuz-3.8.0-31-generic
Error! Could not locate dkms.conf file.
File: does not exist.

Revision history for this message
Alejandro Arcos (aarcos) wrote :
Download full text (16.7 KiB)

Is Back ?

sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-3.11.0-13 linux-headers-3.11.0-13-generic linux-image-3.11.0-13-generic
  linux-image-extra-3.11.0-13-generic
The following packages will be upgraded:
  account-plugin-aim account-plugin-jabber account-plugin-salut account-plugin-yahoo
  at-spi2-core empathy empathy-common gir1.2-atspi-2.0 gnome-control-center
  gnome-control-center-data libatspi2.0-0 libgnome-control-center1 libkpathsea6
  liblightdm-gobject-1-0 libptexenc1 lightdm linux-generic linux-headers-generic
  linux-image-generic linux-libc-dev mcp-account-manager-uoa nautilus-sendto-empathy
  openssh-client python-cupshelpers python3-update-manager ssh-askpass-gnome
  system-config-printer-common system-config-printer-gnome system-config-printer-udev
  texlive-binaries update-manager update-manager-core
32 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 74,5 MB of archives.
After this operation, 258 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main libatspi2.0-0 amd64 2.10.1-0ubuntu0.1 [66,7 kB]
Get:2 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main lightdm amd64 1.8.4-0ubuntu1 [111 kB]
Get:3 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main linux-image-3.11.0-13-generic amd64 3.11.0-13.20 [13,9 MB]
Get:4 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main openssh-client amd64 1:6.2p2-6ubuntu0.1 [490 kB]
Get:5 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main python3-update-manager all 1:0.194.1 [34,9 kB]
Get:6 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main update-manager-core all 1:0.194.1 [5.364 B]
Get:7 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main update-manager all 1:0.194.1 [559 kB]
Get:8 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main nautilus-sendto-empathy amd64 3.8.4-1ubuntu2 [11,8 kB]
Get:9 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main mcp-account-manager-uoa amd64 3.8.4-1ubuntu2 [25,1 kB]
Get:10 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main account-plugin-yahoo amd64 3.8.4-1ubuntu2 [8.834 B]
Get:11 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main account-plugin-salut amd64 3.8.4-1ubuntu2 [8.864 B]
Get:12 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main account-plugin-jabber amd64 3.8.4-1ubuntu2 [8.840 B]
Get:13 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main account-plugin-aim amd64 3.8.4-1ubuntu2 [8.826 B]
Get:14 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main empathy amd64 3.8.4-1ubuntu2 [573 kB]
Get:15 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main empathy-common all 3.8.4-1ubuntu2 [1.519 kB]
Get:16 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main at-spi2-core amd64 2.10.1-0ubuntu0.1 [52,0 kB]
Get:17 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main gir1.2-atspi-2.0 amd64 2.10.1-0ubuntu0.1 [16,7 kB]
Get:18 http://ar.archive.ubuntu.com/ubuntu/ saucy-updates/main libgnome-control-center1 amd64 1:3.6.3-0ubuntu45.1 [80,4 k...

Revision history for this message
Le Gluon Du Net (legluondunet) wrote :

I have this bug on saucy

tags: added: saucy
Changed in dkms (Ubuntu):
importance: Undecided → High
Revision history for this message
Allan Kelly (wolasallank) wrote :

Seems to still be occurring on trusty

Revision history for this message
John Center (john-center) wrote :

The same thing happened to me on trusty, amd64 with the latest version of virtualbox 4.3.18. The strange thing is, dkms.conf was located in /var/lib/dkms/vboxhost/4.3.18/build/, but locate couldn't find it. It found the previous one, v4.3.16, but not the latest one. Only with "find" could I locate it.

Revision history for this message
Woonjas (woonjas) wrote :

Just remove the files and directories belonging to the old version(s) in /var/lib/dkms/vboxhost and run "sudo /etc/init.d/vboxdrv setup" again to fix it.

Revision history for this message
John Center (john-center) wrote :

Thanks for the info. I followed your instructions & the message went away. I had had a lockup of my system, probably caused by the old kernel modules were stilled being loaded. Hopefully this clears it up. -John

Revision history for this message
Ted George (tedlz000) wrote :

To simply remove the files and directories for older versions in /var/lib/dkms/vboxhost is enough to solve this problem. And it is a bug in VirtualBox instead of Ubuntu. VirtualBox should purge the older dkms files everytime when it is installed or reinstalled.

Revision history for this message
Ted George (tedlz000) wrote :

And in addition, there's a bug in the dkms script. The string $"File: $conf does not exist." around line 462 of the file /usr/bin/dkms or /usr/sbin/dkms should be replaced into $"File: $read_conf_file does not exist." because $conf is empty when it is executed here. That's why the output is "File: does not exist." without any information about the filename.

Ted George (tedlz000)
description: updated
tags: added: xenial
tags: added: zesty
Revision history for this message
spike speigel (frail-knight) wrote :

I'm seeing this in 16.04.2 LTS.

During dist-upgrade I see:

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

I too have been having VBox issues, such as locking up my system.

$ sudo apt-cache policy virtualbox dkms
virtualbox:
  Installed: 5.0.36-dfsg-0ubuntu1.16.04.2
  Candidate: 5.0.36-dfsg-0ubuntu1.16.04.2
  Version table:
 *** 5.0.36-dfsg-0ubuntu1.16.04.2 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages
        100 /var/lib/dpkg/status
     5.0.18-dfsg-2build1 500
        500 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages
dkms:
  Installed: 2.2.0.3-2ubuntu11.3
  Candidate: 2.2.0.3-2ubuntu11.3
  Version table:
 *** 2.2.0.3-2ubuntu11.3 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
        100 /var/lib/dpkg/status
     2.2.0.3-2ubuntu11 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial/main i386 Packages

Revision history for this message
spike speigel (frail-knight) wrote :

Ok...For anyone with a Dell XPS 13 9360 who experiences an issue like this:

So I decided to purge and reinstall DKMS:

sudo apt-get purge dkms

BUT that removes all the following:

dkms hid-multitouch-dkms intel-hid-dkms intel-vbutton-dkms oem-audio-hda-daily-dkms virtualbox-dkms

I purged, then went in and manually deleted /var/ib/dkms and all its folders. I thought I could just copy/paste that line above with apt-get install to reinstall everything. I was wrong.

I have a Dell XPS 13 9360 Developer Edition laptop which has some Dell provided driver kernel modules.

oem-audio-hda-daily-dkms was available on their update repo. That was installed by apt-get just fine.

hid-multitouch-dkms intel-hid-dkms intel-vbutton-dkms were NOT available in their update repo. I had to pull those from the Dell OEM Recovery ISO they offer of Ubuntu 16.04 LTS.

I installed them using dpkg.

I then found the following to rebuild kernel modules:

ls /var/lib/initramfs-tools | \
    sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start

All appears fine again, but what a pain!!!

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

Seriously, this bug is open for almost 6!!! years!!!
Why can't someone figure out why on every kernel update we have to manually run dkms command to compile VirtualBox, Nvidia and other modules?

Revision history for this message
rivode (bugs-launchpad-net-rivode) wrote :

I saw this during an upgrade to Artful. Deleting /var/lib/dkms/virtualbox and /var/lib/dkms/vboxhost, then 'aptitude reinstall virtualbox-dkms' seems to have resolved the problem.

dino99 (9d9)
Changed in dkms (Ubuntu):
status: Confirmed → Incomplete
tags: removed: oneiric quantal raring saucy
summary: - [Oneiric] Error during kernel upgrade: Could not locate dkms.conf file
+ Error during kernel upgrade: Could not locate dkms.conf file
Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

And why was this marked incomplete? It definitely happens to a lot of people.

Revision history for this message
dino99 (9d9) wrote :

@Nazar

this has been an issue long time ago, but has been fixed since a while (apt). So this is more a user maintenance problem now rather a bug. I suppose this concern many 'rolling' installations where users:
- have left behind old disturbing setting
- rarely/never clean their system: clean/autoclean/autoremove/bleachbit
- and/or mixed DEs where conflicts are often met.

As an example , see the #31 comment above, which point the lack of maintenance and/or installation made without the metapackage guidance.

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

It is an issue for a lot of people here and today, on up to date Ubuntu version. I'm living on development version of Ubuntu for few years now and it is a pain to manually run dkms for each driver after each kernel upgrade. And I'm regularly cleaning my system from old packages and other garbage.

I'd like this to be marked as "Confirmed" again since it is definitely not "Incomplete" and definitely not fixed yet. And I'd like this to be fixed eventually.

Revision history for this message
dino99 (9d9) wrote :

Then point to the distro used, and expose your issue to their devs. Give them details about which version/source are problematic, if extra packages (ppa, ...)/ custom compiled source ... are also used.
Dkms is not evolved and so will not get fix. That report is useless.

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

Well, this is an issue reported against DKMS package in particular distro: Ubuntu. Not against DKMS as such. It happens on development version of Ubuntu for a long time, can't say how long exactly. Apparently, issue is present since 2011 and is triggered under certain conditions.

From my understanding the problem is in Ubuntu's DKMS package, since regardless of actual module being compiled I always get the same issue. It might be some hook error or something else, but when I update Ubuntu's native kernel while having VirtualBox installed from Ubuntu's native repository, DKMS should compile kernel modules without issues automatically, but currently it doesn't.

If that is not an issue in DKMS package, which is possible, then mark it as affecting another relevant package, but there is something going on wrong that should be fixed and people are suffering from it (71 marked as affected as of right now).

Revision history for this message
Martin Dünkelmann (nc-duenkekl3-deactivatedaccount) wrote :

Ubuntu Mate 17.10
Got a never seen before window about a high important system update.
Got this error in the appearing terminal window.

Revision history for this message
Martin Dünkelmann (nc-duenkekl3-deactivatedaccount) wrote :
Download full text (5.1 KiB)

And now again, while removing the old kernel.

(Lese Datenbank ... 362133 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von linux-headers-4.13.0-21-generic (4.13.0-21.24) ...
Entfernen von linux-headers-4.13.0-21 (4.13.0-21.24) ...
Entfernen von linux-signed-image-4.13.0-21-generic (4.13.0-21.24) ...
GRUB-Konfigurationsdatei wird erstellt …
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-31-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-31-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-25-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-25-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-21-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-21-generic
Windows Boot Manager auf /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi gefunden
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-31-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-31-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-25-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-25-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-21-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-21-generic
Windows Boot Manager auf /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi gefunden
Adding boot menu entry for EFI firmware configuration
erledigt
Entfernen von linux-image-extra-4.13.0-21-generic (4.13.0-21.24) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
GRUB-Konfigurationsdatei wird erstellt …
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-31-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-31-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-25-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-25-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-21-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-21-generic
Windows Boot Manager auf /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi gefunden
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-31-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-31-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-25-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-25-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.13.0-21-generic
initrd-Abbild gefunden: /boot/initrd.img-4.13.0-21-generic
Windows Boot Manager auf /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi gefunden
Adding boot menu entry for EFI firmware configuration
erledigt
Entfernen von linux-image-4.13.0-21-generic (...

Read more...

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

Go to /var/lib/dkms/ and remove any directories from old modules you had in past and do not have installed anymore.
After that it should work fine. It was too difficult for Ubuntu developers to automate, so they've fixed the core issue, but didn't clean /var/lib/dkms/ from older crap.

Revision history for this message
cement_head (andorjkiss) wrote :

@nazar-pc I have no idea what you are talking about. "remove any directories from old modules you had in past and do not have installed anymore" doesn't mean anything to me at all. What "any directories"? Can someone please provide step-by-step instructions for all of this?

Revision history for this message
parth (anarchy89) wrote :
Download full text (6.7 KiB)

I ran apt update followed by apt dist-upgrade on my ubuntu 19.

Here is the output of my lsb_release -rd

Description: Ubuntu 19.04
Release: 19.04

Here is the output where it stopped the first time when i ran apt dist-upgrade.

Unpacking linux-libc-dev:amd64 (5.0.0-21.22) over (5.0.0-20.21) ...
Preparing to unpack .../11-linux-signed-generic_5.0.0.21.22_amd64.deb ...
Unpacking linux-signed-generic (5.0.0.21.22) over (5.0.0.20.21) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-AWRBIG/04-linux-modules-extra-5.0.0-21-generic_5.0.0-21.22_amd64.deb
 /tmp/apt-dpkg-install-AWRBIG/07-linux-headers-5.0.0-21_5.0.0-21.22_all.deb

Then i ran apt dist-upgrade again, and got this error.

(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 221027 files and directories currently installed.)
Preparing to unpack .../linux-modules-extra-5.0.0-21-generic_5.0.0-21.22_amd64.deb ...
Unpacking linux-modules-extra-5.0.0-21-generic (5.0.0-21.22) over (5.0.0-21.22) ...
Preparing to unpack .../linux-headers-5.0.0-21_5.0.0-21.22_all.deb ...
Unpacking linux-headers-5.0.0-21 (5.0.0-21.22) over (5.0.0-21.22) ...
Setting up linux-modules-5.0.0-21-generic (5.0.0-21.22) ...
Setting up iproute2 (4.18.0-1ubuntu2.1) ...
Setting up linux-libc-dev:amd64 (5.0.0-21.22) ...
Setting up dkms (2.6.1-4ubuntu2.2) ...
Setting up linux-headers-5.0.0-21 (5.0.0-21.22) ...
Setting up linux-image-5.0.0-21-generic (5.0.0-21.22) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-5.0.0-20-generic
I: /initrd.img.old is now a symlink to boot/initrd.img-5.0.0-20-generic
I: /vmlinuz is now a symlink to boot/vmlinuz-5.0.0-21-generic
I: /initrd.img is now a symlink to boot/initrd.img-5.0.0-21-generic
Setting up linux-headers-5.0.0-21-generic (5.0.0-21.22) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.0.0-21-generic

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
unset ARCH; env NV_VERBOSE=1 'make' -j16 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.0.0-21-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.0.0-21-generic/build LD=/usr/bin/ld.bfd modules.......
Signing module:
 - /var/lib/dkms/nvidia/418.56/5.0.0-21-generic/x86_64/module/nvidia-uvm.ko
 - /var/lib/dkms/nvidia/418.56/5.0.0-21-generic/x86_64/module/nvidia-modeset.ko
 - /var/lib/dkms/nvidia/418.56/5.0.0-21-generic/x86_64/module/nvidia-drm.ko
 - /var/lib/dkms/nvidia/418.56/5.0.0-21-generic/x86_64/module/nvidia.ko
Secure Boot not enabled on this system.
cleaning build area...

DKMS: build completed.

nvidia.ko:
Running module version sanity check.
modinfo: ERROR: missing module or filename.
 - Origi...

Read more...

Revision history for this message
Syslog.eu (syslog) wrote :

One should adapt the /usr/sbin/dkms script to be more informative when error logging. You can change the line 527 (or similar on your system):

[[ -r $read_conf_file ]] || die 4 $"Could not locate dkms.conf file." \

to something like

[[ -r $read_conf_file ]] || die 4 $"Could not locate $read_conf_file file." \

to see where exactly is the problem located.

Revision history for this message
spec (playaspec) wrote :

@Syslog.eu:

This simple addition allowed me to stop flailing and zero in on the problem!

The "Could not locate dkms.conf file" error wasn't enough. Knowing what it was looking for IMMEDIATELY showed me what the problem was. For whatever reason, the version number reflected in the folder /var/lib/dkms/nvidia/ was *not* the same as the installed driver version. As a result, the contained symlink `source` was also pointed to the wrong version number. Renaming the folder to the installed version and updating the symlink allowed dkms to successfully rebuild the driver. I can only assume the error was a fatfinger on my part as the incorrect version doesn't exist.

I hope your simple addition makes it's way upstream so it can be useful to others.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.