Error message: "kernel package linux-headers-5.11.0-25-generic is not supported" when installing nvidia-340 driver on 2008 MacBook Pro using fresh install of Ubuntu 20.04.2
nvidia-340 package fails to install. I need to install it in order to enable sleep function to work on my laptop.
This is a fresh Ubuntu install with everything else working fine. No problems installing other packages, only nvidia-340. I have previously been able to install nvidia-340 with no issues on this same laptop, for same Ubuntu version 20.04.2, on 26 July 2021, as well as on same laptop with a previous Ubuntu (Precise Pangolin). I installed Ubuntu 20.04.2 yesterday (9 Aug 2021) using the same Ubuntu 20.04.2 live DVD that I used before (approx. 7 July 2021).
diagnostics below as requested by Launchpad Answers forum on this web page https:/
hazel@hazel-
ubuntu-
1701 packages installed, of which:
1640 receive package updates with LTS until 4/2025
61 could receive security updates with ESM Apps until 4/2030
Enable Extended Security Maintenance (ESM Apps) to get 1 security
update (so far) and enable coverage of 61 packages.
This machine is not attached to an Ubuntu Advantage subscription.
See https:/
hazel@hazel-
cat: /etc/dpkg/
hazel@hazel-
i386
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
cat: /etc/apt/apt.conf: No such file or directory
hazel@hazel-
total 92
drwxr-xr-x 2 root root 4096 Aug 10 08:19 .
drwxr-xr-x 7 root root 4096 Aug 10 14:22 ..
-rw-r--r-- 1 root root 49 Aug 9 18:36 00aptitude
-rw-r--r-- 1 root root 40 Aug 9 18:35 00trustcdrom
-rw-r--r-- 1 root root 630 Apr 9 2020 01autoremove
-r--r--r-- 1 root root 1436 Aug 9 18:49 01autoremove-
-rw-r--r-- 1 root root 92 Apr 9 2020 01-vendor-ubuntu
-rw-r--r-- 1 root root 129 Dec 4 2020 10periodic
-rw-r--r-- 1 root root 108 Dec 4 2020 15update-stamp
-rw-r--r-- 1 root root 604 Jul 27 23:54 20apt-esm-hook.conf
-rw-r--r-- 1 root root 85 Dec 4 2020 20archive
-rw-r--r-- 1 root root 80 Jul 22 2020 20auto-upgrades
-rw-r--r-- 1 root root 243 Dec 16 2009 20dbus
-rw-r--r-- 1 root root 1040 Sep 23 2020 20packagekit
-rw-r--r-- 1 root root 114 Nov 20 2020 20snapd.conf
-rw-r--r-- 1 root root 2592 Jan 19 2020 50appstream
-rw-r--r-- 1 root root 625 Oct 8 2019 50command-not-found
-rw-r--r-- 1 root root 5459 Jul 22 2020 50unattended-
-rw-r--r-- 1 root root 435 Jan 19 2020 60icons
-rw-r--r-- 1 root root 251 Jan 19 2020 60icons-hidpi
-rw-r--r-- 1 root root 182 Aug 3 2019 70debconf
-rw-r--r-- 1 root root 305 Dec 4 2020 99update-notifier
hazel@hazel-
Aptitude:
hazel@hazel-
Aptitude:
hazel@hazel-
-rw-r--r-- 1 root root 49 Aug 9 18:36 /etc/apt/
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
hazel@hazel-
Linux hazel-MacBookPro 5.11.0-25-generic #27~20.04.1-Ubuntu SMP Tue Jul 13 17:41:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
cp: cannot stat '/var/lib/
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
hazel@hazel-
Reading package lists... Done
Building dependency tree
Reading state information... Done
hazel@hazel-
Setting up libxnvctrl0:amd64 (470.57.
Setting up screen-
Setting up libc6-i386 (2.31-0ubuntu9.2) ...
Setting up nvidia-settings (470.57.
Setting up libcuda1-340 (340.108-
Setting up lib32gcc-s1 (10.3.0-
Setting up nvidia-340 (340.108-
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-340
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
Removing old nvidia-340-340.108 DKMS files...
-------
Deleting module version: 340.108
completely from the DKMS tree.
-------
Done.
Loading new nvidia-340-340.108 DKMS files...
Building for 5.11.0-25-generic
Building for architecture x86_64
Building initial module for 5.11.0-25-generic
ERROR (dkms apport): kernel package linux-headers-
Error! Bad return status for module build on kernel: 5.11.0-25-generic (x86_64)
Consult /var/lib/
dpkg: error processing package nvidia-340 (--configure):
installed nvidia-340 package post-installation script subprocess returned error exit status 10
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.
I: The initramfs will attempt to resume from /dev/sda1
I: (UUID=2725bc07-
I: Set the RESUME variable to override this.
Errors were encountered while processing:
nvidia-340
hazel@hazel-
hazel@hazel-
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nvidia-340 (340.108-
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-340
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
Removing old nvidia-340-340.108 DKMS files...
-------
Deleting module version: 340.108
completely from the DKMS tree.
-------
Done.
Loading new nvidia-340-340.108 DKMS files...
Building for 5.11.0-25-generic
Building for architecture x86_64
Building initial module for 5.11.0-25-generic
ERROR (dkms apport): kernel package linux-headers-
Error! Bad return status for module build on kernel: 5.11.0-25-generic (x86_64)
Consult /var/lib/
dpkg: error processing package nvidia-340 (--configure):
installed nvidia-340 package post-installation script subprocess returned error exit status 10
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.
I: The initramfs will attempt to resume from /dev/sda1
I: (UUID=2725bc07-
I: Set the RESUME variable to override this.
Errors were encountered while processing:
nvidia-340
E: Sub-process /usr/bin/dpkg returned an error code (1)
hazel@hazel-
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nvidia-340 (340.108-
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-340
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
Removing old nvidia-340-340.108 DKMS files...
-------
Deleting module version: 340.108
completely from the DKMS tree.
-------
Done.
Loading new nvidia-340-340.108 DKMS files...
Building for 5.11.0-25-generic
Building for architecture x86_64
Building initial module for 5.11.0-25-generic
ERROR (dkms apport): kernel package linux-headers-
Error! Bad return status for module build on kernel: 5.11.0-25-generic (x86_64)
Consult /var/lib/
dpkg: error processing package nvidia-340 (--configure):
installed nvidia-340 package post-installation script subprocess returned error exit status 10
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.
I: The initramfs will attempt to resume from /dev/sda1
I: (UUID=2725bc07-
I: Set the RESUME variable to override this.
Errors were encountered while processing:
nvidia-340
E: Sub-process /usr/bin/dpkg returned an error code (1)
hazel@hazel-
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Get:15 http://
Get:16 http://
Get:17 http://
Get:18 http://
Get:19 http://
Get:20 http://
Get:21 http://
Get:22 http://
Get:23 http://
Get:24 http://
Get:25 http://
Get:26 http://
Get:27 http://
Get:28 http://
Get:29 http://
Get:30 http://
Get:31 http://
Get:32 http://
Get:33 http://
Get:34 http://
Get:35 http://
Get:36 http://
Get:37 http://
Get:38 http://
Get:39 http://
Get:40 http://
Get:41 http://
Get:42 http://
Get:43 http://
Get:44 http://
Get:45 http://
Get:46 http://
Get:47 http://
Get:48 http://
Get:49 http://
Get:50 http://
Get:51 http://
Get:52 http://
Get:53 http://
Get:54 http://
Get:55 http://
Get:56 http://
Get:57 http://
Get:58 http://
Get:59 http://
Get:60 http://
Get:61 http://
Get:62 http://
Get:63 http://
Get:64 http://
Get:65 http://
Get:66 http://
Get:67 http://
Get:68 http://
Get:69 http://
Get:70 http://
Get:71 http://
Get:72 http://
Get:73 http://
Get:74 http://
Get:75 http://
Get:76 http://
Get:77 http://
Get:78 http://
Get:79 http://
Get:80 http://
Get:81 http://
Get:82 http://
Get:83 http://
Get:84 http://
Get:85 http://
Get:86 http://
Get:87 http://
Get:88 http://
Get:89 http://
Get:90 http://
Get:91 http://
Get:92 http://
Get:93 http://
Get:94 http://
Get:95 http://
Get:96 http://
Get:97 http://
Get:98 http://
Get:99 http://
Get:100 http://
Get:101 http://
Get:102 http://
Fetched 45.9 MB in 1min 2s (746 kB/s)
Reading package lists... Done
hazel@hazel-
Hit:1 http://
Hit:2 http://
Hit:3 http://
Hit:4 http://
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 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 nvidia-340 (340.108-
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-340
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
Removing old nvidia-340-340.108 DKMS files...
-------
Deleting module version: 340.108
completely from the DKMS tree.
-------
Done.
Loading new nvidia-340-340.108 DKMS files...
Building for 5.11.0-25-generic
Building for architecture x86_64
Building initial module for 5.11.0-25-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/
Error! Bad return status for module build on kernel: 5.11.0-25-generic (x86_64)
Consult /var/lib/
dpkg: error processing package nvidia-340 (--configure):
installed nvidia-340 package post-installation script subprocess returned error exit status 10
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.
I: The initramfs will attempt to resume from /dev/sda1
I: (UUID=2725bc07-
I: Set the RESUME variable to override this.
Errors were encountered while processing:
nvidia-340
E: Sub-process /usr/bin/dpkg returned an error code (1)
hazel@hazel-
Hit:1 http://
Hit:2 http://
Hit:3 http://
Hit:4 http://
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 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 nvidia-340 (340.108-
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-340
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
Removing old nvidia-340-340.108 DKMS files...
-------
Deleting module version: 340.108
completely from the DKMS tree.
-------
Done.
Loading new nvidia-340-340.108 DKMS files...
Building for 5.11.0-25-generic
Building for architecture x86_64
Building initial module for 5.11.0-25-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/
Error! Bad return status for module build on kernel: 5.11.0-25-generic (x86_64)
Consult /var/lib/
dpkg: error processing package nvidia-340 (--configure):
installed nvidia-340 package post-installation script subprocess returned error exit status 10
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.
I: The initramfs will attempt to resume from /dev/sda1
I: (UUID=2725bc07-
I: Set the RESUME variable to override this.
Errors were encountered while processing:
nvidia-340
E: Sub-process /usr/bin/dpkg returned an error code (1)
hazel@hazel-
/etc/apt/
1 # deb cdrom:[Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1)]/ focal main restricted
2
3 # See http://
4 # newer versions of the distribution.
5 deb http://
6 # deb-src http://
7
8 ## Major bug fix updates produced after the final release of the
9 ## distribution.
10 deb http://
11 # deb-src http://
12
13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
14 ## team. Also, please note that software in universe WILL NOT receive any
15 ## review or updates from the Ubuntu security team.
16 deb http://
17 # deb-src http://
18 deb http://
19 # deb-src http://
20
21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
22 ## team, and may not be under a free licence. Please satisfy yourself as to
23 ## your rights to use the software. Also, please note that software in
24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
25 ## security team.
26 deb http://
27 # deb-src http://
28 deb http://
29 # deb-src http://
30
31 ## N.B. software from this repository may not have been tested as
32 ## extensively as that contained in the main release, although it includes
33 ## newer versions of some applications which may provide useful features.
34 ## Also, please note that software in backports WILL NOT receive any review
35 ## or updates from the Ubuntu security team.
36 deb http://
37 # deb-src http://
38
39 ## Uncomment the following two lines to add software from Canonical's
40 ## 'partner' repository.
41 ## This software is not part of Ubuntu, but is offered by Canonical and the
42 ## respective vendors as a service to Ubuntu users.
43 # deb http://
44 # deb-src http://
45
46 deb http://
47 # deb-src http://
48 deb http://
49 # deb-src http://
50 deb http://
51 # deb-src http://
52
53 # This system was installed using small removable media
54 # (e.g. netinst, live or single CD). The matching "deb cdrom"
55 # entries were disabled at the end of the installation process.
56 # For information about how to configure apt package sources,
57 # see the sources.list(5) manual.
hazel@hazel-
The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
nvidia-340 NVIDIA binary driver - version 340.108
hazel@hazel-
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu apt Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Manfred Hampl
- Solved:
- Last query:
- Last reply: