I don't know if this helps. I got this error because, I had my internet connected to the wrong Ethernet port. When I swapped ports, the problem went away.
-- You received this bug notification because you are a member of Kernel Packages, which is subscribed to nvidia-graphics-drivers-460 in Ubuntu. https://bugs.launchpad.net/bugs/1914306 Title: nvidia-kernel-source-460 460.39-0ubuntu0.20.04.1: nvidia kernel module failed to build Status in nvidia-graphics-drivers-460 package in Ubuntu: New Bug description: I found this issue when I'm installing libgl1-mesa-dev, now I cannot either upgrade or -f install. ProblemType: Package DistroRelease: Ubuntu 20.04 Package: nvidia-kernel-source-460 460.39-0ubuntu0.20.04.1 ProcVersionSignature: Ubuntu 5.4.0-65.73-generic 5.4.78 Uname: Linux 5.4.0-65-generic x86_64 ApportVersion: 2.20.11-0ubuntu27.16 Architecture: amd64 CasperMD5CheckResult: skip DKMSKernelVersion: 5.4.0-65-generic Date: Wed Feb 3 08:29:08 2021 Dependencies: DuplicateSignature: dkms:nvidia-kernel-source-460:460.39-0ubuntu0.20.04.1:clang: error: unsupported option '-dumpspecs' InstallationDate: Installed on 2021-01-20 (13 days ago) InstallationMedia: Ubuntu 18.04.5 LTS "Bionic Beaver" - Release amd64 (20200806.1) PackageVersion: 460.39-0ubuntu0.20.04.1 Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2 PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2, 2.7.17-4 RelatedPackageVersions: dpkg 1.19.7ubuntu3 apt 2.0.4 SourcePackage: nvidia-graphics-drivers-460 Title: nvidia-kernel-source-460 460.39-0ubuntu0.20.04.1: nvidia kernel module failed to build UpgradeStatus: Upgraded to focal on 2021-01-26 (7 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-460/+bug/1914306/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp