请帮助我安装可用的 Nvidia 驱动程序

请帮助我安装可用的 Nvidia 驱动程序

我正在运行 Ubuntu 18.04,但我的系统无法与 Nvidia 驱动程序一起工作。

每次我选择任何专有 Nvidia 驱动程序(Noveau 驱动程序除外)时,都会出现错误。

这是我经常遇到的错误:

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libnvidia-ifr1-390 : Depends: libnvidia-gl-390 but it is not installed
 libnvidia-ifr1-390:i386 : Depends: libnvidia-gl-390:i386 but it is not installed
 nvidia-driver-390 : Depends: libnvidia-gl-390 (= 390.48-0ubuntu3) but it is not installed
                     Recommends: libnvidia-gl-390:i386 (= 390.48-0ubuntu3)
E: Unmet dependencies. Try '' with no packages (or specify a solution).

因此,我sudo apt --fix-broken install按照提示运行,然后出现以下错误:

dpkg-divert: error: mismatch on package
  when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-gl-390'
  found 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340'
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-390_390.48-0ubuntu3_amd64.deb (--unpack):
 new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-390_390.48-0ubuntu3_i386.deb
 /var/cache/apt/archives/libnvidia-gl-390_390.48-0ubuntu3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

有人能帮我解决这个问题吗?

编辑 1:我完全卸载了所有 Nvidia 驱动程序,然后尝试安装 390 驱动程序。我收到以下错误消息:

E: /tmp/apt-dpkg-install-nItDms/11-libnvidia-gl-390_390.48-0ubuntu3_amd64.deb: new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2
E: /tmp/apt-dpkg-install-nItDms/14-libnvidia-gl-390_390.48-0ubuntu3_i386.deb: new libnvidia-gl-390:i386 package pre-installation script subprocess returned error exit status 2

答案1

谢谢大家的善意回复。

显然有一个错误影响了某些用户。经过大量的 Google 搜索,我找到了问题的解决方案,它位于此错误报告的评论中: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-390/+bug/1768050

这可能只会影响 18.04,但如果有人偶然发现这个问题,请查看错误报告。

相关内容