下面是我现在试图在Ubuntu上安装任何东西时收到的信息。
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
cuda-libraries-dev-10-1 : Depends: libcublas-dev (>= 10.1.0.105) but it is not going to be installed
cuda-samples-10-1 : Depends: libcublas-dev (>= 10.1.0.105) but it is not going to be installed
cuda-visual-tools-10-1 : Depends: libcublas-dev (>= 10.1.0.105) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).我尝试了apt --fix-broken install,我尝试了purge,我尝试了sudo apt install -f,还有sudo apt-get remove --purge '^nvidia-.*',我无法完成任何事情。一切都失败了。
我厌倦了在恢复模式下重新启动来尝试卸载驱动程序。
这是我对apt --fix-broken install的输出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
libnvidia-common-390
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libcublas-dev
The following NEW packages will be installed:
libcublas-dev
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
8 not fully installed or removed.
Need to get 0 B/39.9 MB of archives.
After this operation, 115 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 735451 files and directories currently installed.)
Preparing to unpack .../libcublas-dev_10.1.0.105-1_amd64.deb ...
Unpacking libcublas-dev (10.1.0.105-1) ...
dpkg: error processing archive /var/cache/apt/archives/libcublas-dev_10.1.0.105-1_amd64.deb (--unpack):
trying to overwrite '/usr/include/cublas_v2.h', which is also in package nvidia-cuda-dev 9.1.85-3ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libcublas-dev_10.1.0.105-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)有人能帮帮我吗?我花了好几个小时来解决这个问题。我试着安装cuda 10.1和已经安装好的cuda 9.1。结果发现这是个错误。我以前的cuda安装很好,但是dpkg完全坏了,它不再工作了。
在没有卸载以前版本的cuda的情况下,我直接尝试安装10.1版本(错误)。我尝试通过以下链接进行安装:https://developer.nvidia.com/cuda-downloads。我选择了:Linux -> x86_64 -> Ubuntu -> 18.04 -> deb(network)和我遵循了那里的指示。
由于这个原因,我无法安装任何东西。
发布于 2019-04-08 10:08:39
好的,要退出,请运行以下命令:
sudo rm /etc/apt/sources.list.d/cuda.list
sudo apt-get clean
sudo apt-get update
sudo apt install -f这将卸载您下载和安装的nvidia回购,并希望系统现在将修复自己。如果没有,我们可以很容易地手动修复它,方法是遵循错误消息。
您可能需要做一些更多的清除,我们可能需要使用dpkg手动完成,所以请张贴更多的错误。谢谢!
发布于 2019-12-24 17:36:18
在我的例子中,删除导致碰撞的包解决了问题。
dpkg -P nvidia-cuda-toolkit nvidia-cuda-dev
apt --fix-broken install发布于 2019-12-15 08:13:08
我不得不在文件/etc/apt/sources.list . line中注释掉以下一行
deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /然后跑
sudo apt --修复坏了的安装
这解决了通过以下Nvidia指令在Ubuntu18.04上安装CUDA工具包10.2下载所造成的软件包管理器故障问题
https://askubuntu.com/questions/1132090
复制相似问题