The following is the message I get when trying to install anything on Ubuntu, right now.
Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: cuda-libraries-dev-10-1 : Depends: libcublas-dev (>= 10.1.0.105) but it is not going to be installed cuda-samples-10-1 : Depends: libcublas-dev (>= 10.1.0.105) but it is not going to be installed cuda-visual-tools-10-1 : Depends: libcublas-dev (>= 10.1.0.105) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
apt --fix-broken install, I tried
purge, I tried
sudo apt install -f, and also
sudo apt-get remove --purge '^nvidia-.*' and I am not able to get anything done. It all fails.
I tired rebooting in recovery mode to try and uninstall the drivers.
This is my output for
apt --fix-broken install:
Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following package was automatically installed and is no longer required: libnvidia-common-390 Use 'sudo apt autoremove' to remove it. 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 4 not upgraded. 8 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 ... 735451 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/include/cublas_v2.h', which is also in package nvidia-cuda-dev 9.1.85-3ubuntu1 dpkg-deb: error: paste subprocess 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)
Can someone please help me? I've been spending hours trying to fix this. I tried installing
cuda 10.1 along with an already present installation of
cuda 9.1. This turned out to be a mistake. My older cuda installation works fine, but
dpkg completely broke, and it is not working anymore.
Without uninstalling the previous version of cuda, I directly tried installing the 10.1 version (by mistake). I tried installing by following the link given here: https://developer.nvidia.com/cuda-downloads. I selected:
Linux -> x86_64 -> Ubuntu -> 18.04 -> deb(network) And I followed the instructions over there.
I am not able to install anything, because of this.