Start with the key error line:
dpkg: error processing archive /var/cuda-repo-10-2-local-10.2.89-440.40/./libcublas-dev_10.2.2.89-1_amd64.deb (--unpack):
trying to overwrite '/usr/include/cublas_v2.h', which is also in package nvidia-cuda-dev:amd64 10.0.130-0lambda3
Let's break that down a little bit:
dpkg: error processing PACKAGE A:
trying to overwrite FILE, which is also in PACKAGE B
PACKAGE A = libcublas-dev:amd64 10.2.2.89-1
PACKAGE B = nvidia-cuda-dev:amd64 10.0.130-0lambda3
FILE = /usr/include/cublas_v2.h
The first problem: Package A and Package B are trying to provide the same file. That means that the packages conflict. That conflict is what's causing the error.
The second problem: Look at the version numbers of each package...they don't match. They probably should.
- You --the human admin-- must decide which version is appropriate for your system.
Take a look at apt cache policy
for both of those packages. If the packages come from different sources, that's probably bad.
- If you have multiple sources, you --the human admin-- must decide which source provides the appropriate packages for your system.
To fix the problem, you must make two decisions (in the bullets above). Then you must implement your decisions:
Disable or delete the conflicting or unwanted sources. They are not helping you anyway.
Uninstall conflicting or wrong-version packages.
It's also possible to use the quick-and-dirty --force-overwrite
flag with apt so the error message goes away. However, I don't recommend that...it doesn't actually solve the underlying problem of mixed sources providing wrong-version packages, which might someday break Cuda entirely.