我刚刚尝试安装 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
,但仍然出现同样的错误。
我想删除并进行全新安装。
谢谢。