我的显卡是 GeForce GTX 1050 Ti。我无法通过“软件和更新”程序安装专有 Nvidia 驱动程序。
当我尝试通过命令行 (sudo apt install nvidia-driver-440 或 sudo ubuntu-drivers autoupdate) 安装它时,我收到以下消息,告诉我“不会安装”依赖项。以下是该消息:
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:
nvidia-driver-440 : Depends: nvidia-dkms-440 (= 440.48.02-0ubuntu0~~18.04.1) but it is not going to be installed
Recommends: libnvidia-decode-440:i386 (= 440.48.02-0ubuntu0~~18.04.1)
Recommends: libnvidia-encode-440:i386 (= 440.48.02-0ubuntu0~~18.04.1)
Recommends: libnvidia-ifr1-440:i386 (= 440.48.02-0ubuntu0~~18.04.1)
Recommends: libnvidia-fbc1-440:i386 (= 440.48.02-0ubuntu0~~18.04.1)
Recommends: libnvidia-gl-440:i386 (= 440.48.02-0ubuntu0~~18.04.1)
E: Unable to correct problems, you have held broken packages.
我已尝试修复损坏的软件包(sudo apt install -f nvidia-dkms-440),但该软件包有自己的依赖项“不会安装”:
The following packages have unmet dependencies:
nvidia-dkms-440 : Depends: dkms but it is not going to be installed
就在那时,我回到了第一条消息中的依赖关系并更仔细地阅读了它:
Depends: nvidia-dkms-440 (= 440.48.02-0ubuntu0~~18.04.1) but it is not going to be installed
这是否意味着依赖项仅适用于 Ubuntu 18.04.1?我有 Ubuntu 18.04.3。我是否必须将 Ubuntu 重新安装到稍早的版本才能使这些依赖项正常工作,还是我应该尝试其他方法?谢谢!
答案1
问题解决了!驱动程序已安装。
因此,事实证明,驱动程序(nvidia-dkms-440)的依赖项有一个依赖项(dkms),而该依赖项又有一个依赖项(dpkg-dev),而该依赖项又有一个依赖项(libdpkg-perl),而该依赖项实际上已安装在我的计算机上。
问题是我拥有该软件包的最新版本 (1.19.0.5ubuntu2.1),但出于某种原因,它阻止我安装 dpkg-dev。我只需降级到 1.19.0.5ubuntu2 并安装此依赖链,这样我终于可以玩 Minecraft 了。