由于软件包损坏,ubuntu-drivers 自动安装无法运行

由于软件包损坏,ubuntu-drivers 自动安装无法运行

我正在运行 Ubuntu 20.04。

有人知道我该如何解决这个问题吗?

root@Ubuntu19-04:~# ubuntu-drivers autoinstall
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-modules-nvidia-460-generic-hwe-18.04-edge : Depends: linux-modules-nvidia-460-5.4.0-60-generic (= 5.4.0-60.67~18.04.1) but 5.4.0-60.67 is to be installed
                                                   Depends: nvidia-kernel-common-460 (<= 460.32.03-1) but it is not going to be installed
                                                   Depends: nvidia-kernel-common-460 (>= 460.32.03) but it is not going to be installed
 nvidia-driver-460 : Depends: libnvidia-gl-460 (= 460.32.03-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: nvidia-kernel-common-460 (<= 460.32.03-1) but it is not going to be installed
                     Depends: nvidia-kernel-common-460 (>= 460.32.03) but it is not going to be installed
                     Depends: nvidia-kernel-source-460 (= 460.32.03-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-extra-460 (= 460.32.03-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-decode-460 (= 460.32.03-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-encode-460 (= 460.32.03-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: nvidia-utils-460 (= 460.32.03-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: xserver-xorg-video-nvidia-460 (= 460.32.03-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-cfg1-460 (= 460.32.03-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-ifr1-460 (= 460.32.03-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-fbc1-460 (= 460.32.03-0ubuntu0.20.04.1) but it is not going to be installed
                     Recommends: libnvidia-decode-460:i386 (= 460.32.03-0ubuntu0.20.04.1)
                     Recommends: libnvidia-encode-460:i386 (= 460.32.03-0ubuntu0.20.04.1)
                     Recommends: libnvidia-ifr1-460:i386 (= 460.32.03-0ubuntu0.20.04.1)
                     Recommends: libnvidia-fbc1-460:i386 (= 460.32.03-0ubuntu0.20.04.1)
                     Recommends: libnvidia-gl-460:i386 (= 460.32.03-0ubuntu0.20.04.1)
E: Unable to correct problems, you have held broken packages.

我尝试过dpkg --configure -a,但apt install -f无济于事。

答案1

  1. 尝试手动安装依赖项,例如sudo apt install linux-modules-nvidia-460-5.4.0-60-generic等等......然后运行sudo apt update && sudo apt dist-upgrade
  2. 如果这不起作用,请卸载所有 nvidia 驱动程序并ubuntu-drivers autoinstall再次运行。

答案2

我曾经用过这个问题的答案:Ubuntu 18.04 libnvidia-common-450 软件包安装失败

但是我将包名称从

libnvidia-common-450-server

nvidia-driver-460-server

相关内容