我正在尝试安装 cuda 工具包 9.1。
深入到依赖项中其中一个是 nvidia-418。
跑步时
sudo apt-get install nvidia-418
我收到以下错误。
The following NEW packages will be installed:
nvidia-418
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
10 not fully installed or removed.
Need to get 0 B/104 MB of archives.
After this operation, 437 MB of additional disk space will be used.
(Reading database ... 279654 files and directories currently installed.)
Preparing to unpack .../nvidia-418_418.40.04-0ubuntu1_amd64.deb ...
Unpacking nvidia-418 (418.40.04-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-418_418.40.04-0ubuntu1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0', which is also in package libglx-mesa0:amd64 18.2.8-0ubuntu0~18.04.2
Errors were encountered while processing:
/var/cache/apt/archives/nvidia-418_418.40.04-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我应该卸载 libGLX_indirect 吗?
答案1
运行 sudo dpkg -i --force-overwrite /var/cache/apt/archives/dkms_2.3-3ubuntu9.2_all.deb
和
sudo dpkg -i --force-overwrite /var/cache/apt/archives/nvidia-418_418.40.04-0ubuntu1_amd64.deb
让我解决了这个问题。可能是包装错误?