issues after installing cuda 10....

I am not sure where to ask this question or even if it is a cuda 10 issue but maybe you can help me find out where to post it.

When I tried to update recently on ubuntu16 GTX1060 I get the following conflict…

sudo apt-get install -f

Unpacking libcublas-dev (10.1.0.105-1) …
dpkg: error processing archive /var/cache/apt/archives/libcublas-dev_10.1.0.105-1_amd64.deb (–unpack):
trying to overwrite ‘/usr/lib/x86_64-linux-gnu/stubs/libcublas.so’, which is also in package nvidia-cuda-dev 7.5.18-0ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

How can I get around this error?

==============================================================================================

Here is some additional data:

******>>l /usr/lib/x86_64-linux-gnu/stubs

libcublas.so libcufft.so libcurand.so libcusparse.so libnppi.so libnvrtc.so
libcuda.so libcufftw.so libcusolver.so libnppc.so libnpps.so

*****>>ls /usr/lib/x86_64-linux-gnu/libcud

libcudadevrt.a libcudart.so.7.5.18 libcuda.so.1 libcudnn.so.6 libcudnn.so.7.1.4
libcudart.so libcudart_static.a libcuda.so.396.44 libcudnn.so.6.0.21 libcudnn_static.a
libcudart.so.7.5 libcuda.so libcudnn.so libcudnn.so.7 libcudnn_static_v7.a

*****>>ls /usr/lib/x86_64-linux-gnu/libcub

libcublas_device.a libcublasLt.so.10.1.0.105 libcublas.so.10 libcublas.so.7.5 libcublas_static.a
libcublasLt.so.10 libcublas.so libcublas.so.10.1.0.105 libcublas.so.7.5.18

******>>ls /usr/lib/i386-linux-gnu/

libcuda.so libcuda.so.1 libcuda.so.396.44 libnvidia-opencl.so.1 libnvidia-opencl.so.396.44

Telling by the errors, you would have to uninstall cuda 7.5 first.

I seem to be unable to uninstall … any help appreciated.

sudo apt-get install -f


Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  cuda-command-line-tools-10-1 cuda-compiler-10-1 cuda-cudart-10-1 cuda-cudart-dev-10-1 cuda-cufft-10-1 cuda-cufft-dev-10-1 cuda-cuobjdump-10-1 cuda-cupti-10-1 cuda-curand-10-1 cuda-curand-dev-10-1 cuda-cusolver-10-1 cuda-cusolver-dev-10-1 cuda-cusparse-10-1
  cuda-cusparse-dev-10-1 cuda-documentation-10-1 cuda-driver-dev-10-1 cuda-gdb-10-1 cuda-gpu-library-advisor-10-1 cuda-libraries-10-1 cuda-libraries-dev-10-1 cuda-license-10-1 cuda-memcheck-10-1 cuda-misc-headers-10-1 cuda-npp-10-1 cuda-npp-dev-10-1 cuda-nsight-10-1
  cuda-nsight-compute-10-1 cuda-nsight-systems-10-1 cuda-nvcc-10-1 cuda-nvdisasm-10-1 cuda-nvgraph-10-1 cuda-nvgraph-dev-10-1 cuda-nvjpeg-10-1 cuda-nvjpeg-dev-10-1 cuda-nvml-dev-10-1 cuda-nvprof-10-1 cuda-nvprune-10-1 cuda-nvrtc-10-1 cuda-nvrtc-dev-10-1
  cuda-nvtx-10-1 cuda-nvvp-10-1 cuda-samples-10-1 cuda-sanitizer-api-10-1 cuda-toolkit-10-1 cuda-tools-10-1 cuda-visual-tools-10-1 libcublas-dev libcublas10 linux-headers-4.15.0-43 linux-headers-4.15.0-43-generic linux-image-4.15.0-43-generic
  linux-modules-4.15.0-43-generic linux-modules-extra-4.15.0-43-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libcublas-dev
The following NEW packages will be installed:
  libcublas-dev
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
6 not fully installed or removed.
Need to get 0 B/39.9 MB of archives.
After this operation, 115 MB of additional disk space will be used.
Do you want to continue? [Y/n] y



(Reading database ... 480146 files and directories currently installed.)
Preparing to unpack .../libcublas-dev_10.1.0.105-1_amd64.deb ...
Unpacking libcublas-dev (10.1.0.105-1) ...
dpkg: error processing archive /var/cache/apt/archives/libcublas-dev_10.1.0.105-1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/stubs/libcublas.so', which is also in package nvidia-cuda-dev 7.5.18-0ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libcublas-dev_10.1.0.105-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)



(base) rjn@rjn-Oryx-Pro:~/projects/voice/TTS$ sudo dpkg -P nvidia-cuda-dev
dpkg: dependency problems prevent removal of nvidia-cuda-dev:
 nvidia-cuda-toolkit depends on nvidia-cuda-dev (= 7.5.18-0ubuntu1).

dpkg: error processing package nvidia-cuda-dev (--purge):
 dependency problems - not removing
Errors were encountered while processing:
 nvidia-cuda-dev

maybe
sudo apt-get remove --purge nvidia-cuda*

yes…I did a sudo apt-get remove and that seemed to resolve the issue. I did not do a purge nivdia-cuda*

Even I encountered the same issue. I resolved it using the following steps:

You will see this line in your error…

trying to overwrite '/usr/lib/x86_64-linux-gnu/stubs/libcublas.so', which is also in package nvidia-cuda-dev 7.5.18-0ubuntu1

This means that the /usr/lib/x86_64-linux-gnu/stubs/libcublas.so is already present and cannot be overwritten by dpkg.

I tried these commands to fix the issue. (WARNING: The older libcublas.so will be replaced by new libcublas.so… It may affect your environment…)

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libcublas-dev_10.1.0.105-1_amd64.deb
sudo apt-get -f install

Preferably remove unwanted files after this by running

sudo apt autoremove