I recently upgraded my desktop to Ubuntu 20.04. But when installing the driver for my graphics card something went apparently wrong.

When I open the 'Software & Updates' application it show me that Ubuntu finds my card as 'NVIDIA Corperation: TU116[GeForce GTX 1660 SUPER]' It gives me the options:

• Using NVIDIA driver metapackage from nvidia-driver-440 (proprietary, tested)
• Using X.Org.X server – Nouveau display driver from xserver-xorg-video-nouveau (open source) 

When I try to select the nvidia option something seems to go wrong and I get the following error:

Error while applying changes
pk-client-error-quark: Error while installing package: installed nvidia-dmks-440 package post-installation script subprocess returned error status 10(313)

When I triede installing the driver through the command-line I got the following:

After this operation, 37,3 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Selecting previously unselected package nvidia-compute-utils-440.
(Reading database ... 402066 files and directories currently installed.)
Preparing to unpack .../0-nvidia-compute-utils-440_440.82+really.440.64-0ubuntu6_amd64.deb ...
Unpacking nvidia-compute-utils-440 (440.82+really.440.64-0ubuntu6) ...
Selecting previously unselected package nvidia-kernel-source-440.
Preparing to unpack .../1-nvidia-kernel-source-440_440.82+really.440.64-0ubuntu6_amd64.deb ...
Unpacking nvidia-kernel-source-440 (440.82+really.440.64-0ubuntu6) ...
Selecting previously unselected package nvidia-kernel-common-440.
Preparing to unpack .../2-nvidia-kernel-common-440_440.82+really.440.64-0ubuntu6_amd64.deb ...
Unpacking nvidia-kernel-common-440 (440.82+really.440.64-0ubuntu6) ...
Selecting previously unselected package nvidia-dkms-440.
Preparing to unpack .../3-nvidia-dkms-440_440.82+really.440.64-0ubuntu6_amd64.deb ...
Unpacking nvidia-dkms-440 (440.82+really.440.64-0ubuntu6) ...
Selecting previously unselected package nvidia-utils-440.
Preparing to unpack .../4-nvidia-utils-440_440.82+really.440.64-0ubuntu6_amd64.deb ...
Unpacking nvidia-utils-440 (440.82+really.440.64-0ubuntu6) ...
Selecting previously unselected package nvidia-driver-440.
Preparing to unpack .../5-nvidia-driver-440_440.82+really.440.64-0ubuntu6_amd64.deb ...
Unpacking nvidia-driver-440 (440.82+really.440.64-0ubuntu6) ...
Setting up nvidia-kernel-source-440 (440.82+really.440.64-0ubuntu6) ...
Setting up nvidia-utils-440 (440.82+really.440.64-0ubuntu6) ...
Setting up nvidia-compute-utils-440 (440.82+really.440.64-0ubuntu6) ...
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `nvidia-persistenced' (UID 124) ...
Adding new group `nvidia-persistenced' (GID 130) ...
Adding new user `nvidia-persistenced' (UID 124) with group `nvidia-persistenced' ...
Not creating home directory `/nonexistent'.
Setting up nvidia-kernel-common-440 (440.82+really.440.64-0ubuntu6) ...
update-initramfs: deferring update (trigger activated)
Setting up nvidia-dkms-440 (440.82+really.440.64-0ubuntu6) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Loading new nvidia-440.64 DKMS files...
Building for 5.4.0-31-generic
Building for architecture x86_64
Building initial module for 5.4.0-31-generic
Error! Bad return status for module build on kernel: 5.4.0-31-generic (x86_64)
Consult /var/lib/dkms/nvidia/440.64/build/make.log for more information.
dpkg: error processing package nvidia-dkms-440 (--configure):
 installed nvidia-dkms-440 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-440:
 nvidia-driver-440 depends on nvidia-dkms-440 (= 440.82+really.440.64-0ubuntu6) | nvidia-dkms-440 (= 440.82+really.440.64-0ubuntu4); however:
  Package nvidia-dkms-440 is not configured yet.
  Version of nvidia-dkms-440 on system is 440.82+really.440.64-0ubuntu6.

dpkg: error processing package nvidia-driver-440 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                                                                                                            Processing triggers for man-db (2.9.1-1) ...
Processing triggers for initramfs-tools (0.136ubuntu6) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-31-generic
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Contents of /var/crash/nvidia-dkms-440.0.crash

ProblemType: Package
 DKMS make.log for nvidia-440.64 for kernel 5.4.0-31-generic (x86_64)
 Mi 20 Mai 2020 14:36:56 CEST
 make[1]: Entering directory '/usr/src/linux-headers-5.4.0-31-generic'
 arch/x86/Makefile:147: CONFIG_X86_X32 enabled but no binutils support
 make[1]: /usr/bin/gcc: Command not found
 test -e include/generated/autoconf.h -a -e include/config/auto.conf || (       \
 echo >&2;                          \
 echo >&2 "  ERROR: Kernel configuration is invalid.";      \
 echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
 echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it."; \
 echo >&2 ;                         \
 make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia/440.64/build \
 single-build= \
 need-builtin=1 need-modorder=1
 /bin/sh: 1: cc: not found

 The C compiler '/usr/bin/gcc' does not appear to be able to
 create object files.  Please make sure you have 
 your Linux distribution's libc development package
 installed and that '/usr/bin/gcc' is a valid C compiler

 *** Failed CC sanity check. Bailing out! ***

 make[2]: *** [/var/lib/dkms/nvidia/440.64/build/Kbuild:194: cc_sanity_check] Error 1
 make[2]: *** Waiting for unfinished jobs....
 make[1]: *** [Makefile:1719: /var/lib/dkms/nvidia/440.64/build] Error 2
 make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-31-generic'
 make: *** [Makefile:81: modules] Error 2
DKMSKernelVersion: 5.4.0-31-generic
Date: Wed May 20 14:36:58 2020
Package: nvidia-dkms-440 440.82+really.440.64-0ubuntu6
PackageVersion: 440.82+really.440.64-0ubuntu6
SourcePackage: nvidia-graphics-drivers-440
Title: nvidia-dkms-440 440.82+really.440.64-0ubuntu6: nvidia kernel module failed to build

2 Answers 2


Feeling rather silly having overlooked this, but apparently it gave some compilation error due to GCC not being properly upgraded.

I've reinstalled GCC and then it worked like a charm.

First, identify the version of gcc using the gcc -v command:

$ gcc -v
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04)   

Then reinstall gcc:

sudo apt-get install --reinstall gcc-9.4.0  

Change 9.4.0 with your version.


I confirm. I had some kind of unrecoverable error while installing Ububntu. When I started Ubuntu after installation I was unable to change the graphics card driver. After entering the command in the terminal:

sudo apt reinstall build-essential

I was able to change the graphics card driver.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.