Ubuntu 22.04.1 LTS 升级:无法安装 nvidia-driver-470 / nvidia-driver-525

Ubuntu 22.04.1 LTS 升级:无法安装 nvidia-driver-470 / nvidia-driver-525

我想知道是否有人在升级到 Ubuntu 22.04.1 LTS 时遇到与我相同的问题以及如何解决。

总之,问题是我无法安装 nvidia-dkms-525 驱动程序,如果我没记错的话,它是 Ubuntu 22.04.1 LTS 内核的正确版本。

如果有人能通过一些方法找到解决方案,我将不胜感激。TIA

以下是有关此问题的一些详细信息:

$ sudo apt install nvidia-driver-525

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nvidia-driver-525 is already the newest version (525.60.11-0ubuntu0.22.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 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-dkms-525 (525.60.11-0ubuntu0.22.04.1) ...
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
Removing old nvidia-525.60.11 DKMS files...
Deleting module nvidia-525.60.11 completely from the DKMS tree.
Loading new nvidia-525.60.11 DKMS files...
Building for 5.15.0-56-generic
Building for architecture x86_64
Building initial module for 5.15.0-56-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-dkms-525.0.crash'
Error! Bad return status for module build on kernel: 5.15.0-56-generic (x86_64)
Consult /var/lib/dkms/nvidia/525.60.11/build/make.log for more information.
dpkg: error processing package nvidia-dkms-525 (--configure):
 installed nvidia-dkms-525 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-525:
 nvidia-driver-525 depends on nvidia-dkms-525 (<= 525.60.11-1); however:
  Package nvidia-dkms-525 is not configured yet.
 nvidia-driver-525 depends on nvidia-dkms-525 (>= 525.60.11); however:
  Package nvidia-dkms-525 is not configured yet.

dpkg: error processing package nvidia-driver-525 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for initramfs-tools (0.140ubuntu13.1) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-56-generic
Errors were encountered while processing:
 nvidia-dkms-525
 nvidia-driver-525
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ 减 /var/crash/nvidia-dkms-525.0.crash

ProblemType: Package
DKMSBuildLog:
 DKMS make.log for nvidia-525.60.11 for kernel 5.15.0-56-generic (x86_64)
 Mon Jan  2 06:09:44 PM CET 2023
 make[1]: Entering directory '/usr/src/linux-headers-5.15.0-56-generic'
 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 ;                                                     \
 /bin/false)
 
   ERROR: Kernel configuration is invalid.
          include/generated/autoconf.h or include/config/auto.conf are missing.
          Run 'make oldconfig && make prepare' on kernel src to fix it.
 
 make[1]: *** [Makefile:750: include/config/auto.conf] Error 1
 make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-56-generic'
 make: *** [Makefile:82: modules] Error 2
DKMSKernelVersion: 5.15.0-56-generic
Date: Mon Jan  2 18:09:45 2023
Package: nvidia-dkms-525 525.60.11-0ubuntu0.22.04.1
PackageVersion: 525.60.11-0ubuntu0.22.04.1
SourcePackage: nvidia-graphics-drivers-525
Title: nvidia-dkms-525 525.60.11-0ubuntu0.22.04.1: nvidia kernel module failed to build
/var/crash/nvidia-dkms-525.0.crash (END)

$ 少 /var/lib/dkms/nvidia/525.60.11/build/make.log

DKMS make.log for nvidia-525.60.11 for kernel 5.15.0-56-generic (x86_64)
Mon Jan  2 07:07:48 PM CET 2023
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-56-generic'
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 ;                                                      \
/bin/false)

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

make[1]: *** [Makefile:750: include/config/auto.conf] Error 1
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-56-generic'
make: *** [Makefile:82: modules] Error 2
/var/lib/dkms/nvidia/525.60.11/build/make.log (END)

这是升级过程中出现的错误图片:

在此处输入图片描述

这是启动过程中的错误图片(最后操作系统启动了,我可以成功登录等等)。

在此处输入图片描述

编辑:

抱歉,我还没有找到更好的方法来附加输出,因为正文限制为 30000 个字符,而我试图输入超过 40000 个字符。

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

编辑:

似乎所有“rc”包都已被清除,此外我还安装了 nvidia-driver-525。

$ sudo apt install nvidia-driver-525

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nvidia-driver-525 is already the newest version (525.60.11-0ubuntu0.22.04.1).
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
 

$ dpkg -l | egrep '^rc'

<EMPTY>

$ apt 列表--已安装|grep-i nvidia

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libnvidia-cfg1-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]
libnvidia-common-525/jammy-updates,jammy-updates,jammy-security,jammy-security,now 525.60.11-0ubuntu0.22.04.1 all [installed,automatic]
libnvidia-compute-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]
libnvidia-compute-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 i386 [installed,automatic]
libnvidia-decode-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]
libnvidia-decode-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 i386 [installed,automatic]
libnvidia-egl-wayland1/jammy,now 1:1.1.9-1.1 amd64 [installed,automatic]
libnvidia-encode-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]
libnvidia-encode-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 i386 [installed,automatic]
libnvidia-extra-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]
libnvidia-fbc1-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]
libnvidia-fbc1-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 i386 [installed,automatic]
libnvidia-gl-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]
libnvidia-gl-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 i386 [installed,automatic]
linux-modules-nvidia-525-5.15.0-56-generic/jammy-updates,jammy-security,now 5.15.0-56.62+1 amd64 [installed,automatic]
linux-modules-nvidia-525-generic/jammy-updates,jammy-security,now 5.15.0-56.62+1 amd64 [installed]
linux-objects-nvidia-515-5.15.0-56-generic/jammy-updates,jammy-security,now 5.15.0-56.62+1 amd64 [installed,automatic]
linux-objects-nvidia-525-5.15.0-56-generic/jammy-updates,jammy-security,now 5.15.0-56.62+1 amd64 [installed,automatic]
linux-signatures-nvidia-5.15.0-56-generic/jammy-updates,jammy-security,now 5.15.0-56.62+1 amd64 [installed,automatic]
nvidia-compute-utils-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]
nvidia-driver-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed]
nvidia-kernel-common-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]
nvidia-kernel-source-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]
nvidia-prime/jammy,jammy,now 0.8.17.1 all [installed,automatic]
nvidia-settings/jammy,jammy,now 510.47.03-0ubuntu1 amd64 [installed,automatic]
nvidia-utils-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]
xserver-xorg-video-nvidia-525/jammy-updates,jammy-security,now 525.60.11-0ubuntu0.22.04.1 amd64 [installed,automatic]

在此处输入图片描述

但我在启动过程中仍然遇到类似的错误(最后操作系统启动了,我可以成功登录等)。

在此处输入图片描述

请问大家有什么想法吗?我对这个问题有点困惑

相关内容