![修复损坏的安装不起作用?](https://linux22.com/image/1200765/%E4%BF%AE%E5%A4%8D%E6%8D%9F%E5%9D%8F%E7%9A%84%E5%AE%89%E8%A3%85%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%EF%BC%9F.png)
我刚刚尝试安装 Nvidia Cuda 和 cudnn。但是现在当我尝试运行命令时upgrade
,它显示此错误:
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
cuda-drivers : Depends: cuda-drivers-550 (= 550.54.14-1) but it is not installed
libnvidia-decode-535 : Depends: libnvidia-compute-535 (= 535.104.05-0ubuntu1) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
然后我尝试运行sudo apt --fix-broken install
,但出现以下错误:
Preparing to unpack .../libnvidia-gl-550_550.54.14-0ubuntu1_amd64.deb ...
dpkg-query: no packages found matching libnvidia-gl-535
Unpacking libnvidia-gl-550:amd64 (550.54.14-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-
gl-550_550.54.14-0ubuntu1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libnvidia-api.so.1', which is al
so in package libnvidia-extra-535:amd64 535.104.05-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cuda-repo-ubuntu2204-12-4-local/./libnvidia-gl-550_550.54.14-0ubuntu1_amd6
4.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
然后我尝试使用删除 nvidia 包sudo apt purge nvidia-*
,但它仍然出现这些错误:
...
...
Package 'nvidia-kernel-source-550' is not installed, so not removed
Package 'nvidia-utils-530' is not installed, so not removed
Package 'nvidia-utils-550' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
cuda-drivers : Depends: cuda-drivers-550 (= 550.54.14-1) but it is not going to be installed
libnvidia-decode-535 : Depends: libnvidia-compute-535 (= 535.104.05-0ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
然后我尝试sudo apt install -f
,但仍然出现同样的错误。
我想删除并进行全新安装。
谢谢。