Ubuntu 18.04 libnvidia-common-450 软件包安装失败

Ubuntu 18.04 libnvidia-common-450 软件包安装失败

我刚刚在我的工作站上安装了 Ubuntu 18.04.5 LTS 以及推荐的 nvidia 驱动程序,我以前也sudo ubuntu-drivers autoinstall这样做过,并ubuntu-drivers devices建议安装nvidia-driver-450-server - distro non-free recommended

但是,安装推荐的驱动程序后,我的软件包系统坏了。当我尝试使用“软件更新程序”更新软件时,我收到以下消息:

The package system is broken. Check if you are using third party
repositories. If so disable them, since they are a common source of
problems.
Furthermore run the following command in a Terminal: apt-get install -f
Transaction failed: The package system is broken
 The following packages have unmet dependencies: libnvidia-gl-450: Depends: libnvidia-common-450 but it is not installed
                  Depends: libgcc1 (>= 1:4.2) but 1:8.4.0-1ubuntu1~18.04 is installed
libnvidia-gl-450:i386: Depends: libnvidia-common-450 but it is not installed

强制安装使用该包sudo apt-get install -f libnvidia-common-450会导致以下错误:

dpkg: error processing archive /var/cache/apt/archives/libnvidia-common-450_450.80.02-0ubuntu0.18.04.2_all.deb
(--unpack):
 trying to overwrite '/usr/share/nvidia/nvidia-application-profiles-450.80.02-key-documentation',
 which is also in package libnvidia-common-450-server  450.80.02-0ubuntu0.18.04.3
 Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-common-450_450.80.02-0ubuntu0.18.04.2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

什么都没有解决。尝试使用重新配置包时,sudo dpkg --configure -a提示包libnvidia-common-450 is not installed。我不知道下一步该怎么做,如能得到任何建议我将不胜感激。

答案1

我使用以下命令解决了这个问题重新安装libnvidia-common-450-server

sudo apt-get -o Dpkg::Options::="--force-overwrite" install -f libnvidia-common-450-server

按照在线文章安装 nvidia 驱动程序后,问题就开始了。这是我收到的错误:

libnvidia-gl-450-server: Depends: libnvidia-common-450-server but it
is not installed Depends: libgcc1 (>= 1:4.2) but
1:8.4.0-1ubuntu1~18.04 is installed libnvidia-gl-450-server:i386:
Depends: libnvidia-common-450-server but it is not installed

答案2

同样的问题。同样由于无法通过软件更新程序更新,并且安装过程中出现其他问题,导致相同的依赖性错误。这也为我解决了这个问题:

sudo apt-get -o Dpkg::Options::="--force-overwrite" install -f libnvidia-common-450

相关内容