This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-install-cuda-on-ubuntu-20-04-focal-fossa-linux
Unfortunately it did not yet work for me you documented. I get the warning
dpkg: error processing archive /var/cache/apt/archives/libcublas10_10.2.2.89-1_amd64.deb (–unpack):
trying to overwrite ‘/usr/lib/x86_64-linux-gnu/libnvblas.so.10’, which is also in package libnvblas10:amd64 10.1.243-3
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
Did I miss a step?
I had this happen as well. It may be related to an older version of CUDA being installed, but possibly not. Either way I was able to get past the error by running
$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/libcublas10_10.2.2.89-1_amd64.deb $ sudo apt --fix-broken install
You will get some warnings after running the first command but the --fix-broken-install clears that right up.
sudo apt install nvidia-cuda-toolkit
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nvidia-cuda-toolkit : Depends: nvidia-cuda-dev (= 10.1.243-3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.