Solution for cuda compiler 12 3 Depends cuda nvcc 12 3 |apt --fix-broken install

Опубликовано: 15 Июль 2026
на канале: tech 4tress
177
2

Solution :
sudo apt --fix-broken install -o Dpkg::Options::="--force-overwrite"

Error faced:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libnvidia-compute-535 libwmf0.2-7 linux-headers-6.1.11-76060111
linux-headers-6.1.11-76060111-generic linux-image-6.1.11-76060111-generic
linux-modules-6.1.11-76060111-generic nvidia-driver-535
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
cuda-nvcc-12-3 cuda-nvrtc-12-3 cuda-nvrtc-dev-12-3 libcurand-12-3
libcurand-dev-12-3
The following packages will be upgraded:
cuda-nvcc-12-3 cuda-nvrtc-12-3 cuda-nvrtc-dev-12-3 libcurand-12-3
libcurand-dev-12-3
5 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
9 not fully installed or removed.
Need to get 0 B/144 MB of archives.
After this operation, 4,096 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 326513 files and directories currently installed.)
Preparing to unpack .../cuda-nvrtc-12-3_12.3.107-1_amd64.deb ...
Unpacking cuda-nvrtc-12-3 (12.3.107-1) over (12.3.103-1) ...
dpkg: error processing archive /var/cache/apt/archives/cuda-nvrtc-12-3_12.3.107-
1_amd64.deb (--unpack):
trying to overwrite '/usr/local/cuda-12.3/lib64', which is also in package cuda
-cccl-12-3 12.3.101-1
Preparing to unpack .../libcurand-12-3_10.3.4.107-1_amd64.deb ...
Unpacking libcurand-12-3 (10.3.4.107-1) over (10.3.4.101-1) ...
dpkg: error processing archive /var/cache/apt/archives/libcurand-12-3_10.3.4.107
-1_amd64.deb (--unpack):
trying to overwrite '/usr/local/cuda-12.3/lib64', which is also in package cuda
-cccl-12-3 12.3.101-1
Preparing to unpack .../cuda-nvcc-12-3_12.3.107-1_amd64.deb ...
Unpacking cuda-nvcc-12-3 (12.3.107-1) over (12.3.103-1) ...
dpkg: error processing archive /var/cache/apt/archives/cuda-nvcc-12-3_12.3.107-1
_amd64.deb (--unpack):
trying to overwrite '/usr/local/cuda-12.3/include', which is also in package cu
da-cccl-12-3 12.3.101-1
Preparing to unpack .../cuda-nvrtc-dev-12-3_12.3.107-1_amd64.deb ...
Unpacking cuda-nvrtc-dev-12-3 (12.3.107-1) over (12.3.103-1) ...
dpkg: error processing archive /var/cache/apt/archives/cuda-nvrtc-dev-12-3_12.3.
107-1_amd64.deb (--unpack):
trying to overwrite '/usr/local/cuda-12.3/include', which is also in package cu
da-cccl-12-3 12.3.101-1
No apport report written because MaxReports is reached already
Preparing to unpac
k .../libcurand-dev-12-3_10.3.4.107-1_amd64.deb ...
Unpacking libcurand-dev-12-3 (10.3.4.107-1) over (10.3.4.101-1) ...
dpkg: error processing archive /var/cache/apt/archives/libcurand-dev-12-3_10.3.4
.107-1_amd64.deb (--unpack):
trying to overwrite '/usr/local/cuda-12.3/include', which is also in package cu
da-cccl-12-3 12.3.101-1
No apport report written because MaxReports is reached already
Errors were encoun
tered while processing:
/var/cache/apt/archives/cuda-nvrtc-12-3_12.3.107-1_amd64.deb
/var/cache/apt/archives/libcurand-12-3_10.3.4.107-1_amd64.deb
/var/cache/apt/archives/cuda-nvcc-12-3_12.3.107-1_amd64.deb
/var/cache/apt/archives/cuda-nvrtc-dev-12-3_12.3.107-1_amd64.deb
/var/cache/apt/archives/libcurand-dev-12-3_10.3.4.107-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
cuda-compiler-12-3 : Depends: cuda-nvcc-12-3 (= 12.3.107) but 12.3.103-1 is installed
cuda-libraries-12-3 : Depends: cuda-nvrtc-12-3 (= 12.3.107) but 12.3.103-1 is installed
Depends: libcurand-12-3 (= 10.3.4.107) but 10.3.4.101-1 is installed
cuda-libraries-dev-12-3 : Depends: cuda-nvrtc-dev-12-3 (= 12.3.107) but 12.3.103-1 is installed
Depends: libcurand-dev-12-3 (= 10.3.4.107) but 10.3.4.101-1 is installed
cuda-nvcc-12-3 : Depends: cuda-nvvm-12-3 (= 12.3.103-1) but 12.3.107-1 is installed
Depends: cuda-crt-12-3 (= 12.3.103-1) but 12.3.107-1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).