尝试在更新后安装最新的 Nvidia/CUDA,驱动程序工具指向 340.108(专有,已测试),但我尝试安装 cuda Ubuntu 软件包...现在我得到了
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libnvidia-compute-460
The following NEW packages will be installed:
libnvidia-compute-460
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
9 not fully installed or removed.
Need to get 0 B/21.8 MB of archives.
After this operation, 102 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 460152 files and directories currently installed.)
Preparing to unpack .../libnvidia-compute-460_460.39-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-compute-460:amd64 (460.39-0ubuntu0.20.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libnvidia-compute-460_460.39-0ubuntu0.20.04.1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libnvidia-ml.so', which is also in package nvidia-340 340.108-0ubuntu5.20.04.1
Errors were encountered while processing:
/var/cache/apt/archives/libnvidia-compute-460_460.39-0ubuntu0.20.04.1_amd64.deb
如果允许的话我更喜欢 460 但为什么这会发生冲突 - 我是否需要删除并重新安装,就像我在有问题的旧 Nvidia 系统上所做的那样?
需要明确的是,“nvidia-cuda-toolkit”在 Ubuntu focal 20.04 上需要 libnvidia-compute-460,但工具中安装的驱动程序是 nvidia-340(“附加驱动程序”选项卡中的“专有,已测试”),这是除 Nouveau 开源驱动程序之外的唯一选择。为什么?
答案1
可能的解决方法:
安装失败后,可以用DPKG“--force-overwrite”修复:
apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken
作为安装命令行的额外标志:
apt-get -o Dpkg::Options::="--force-overwrite" install nvidia-cuda-toolkit
无论您喜欢使用哪种工具,似乎都可以在以及Dpkg::Options
的命令行上提供相同的参数。apt
apt-get