Everytime I try to install vim, I get this strange problem:
The following packages have unmet dependencies:
cuda-libraries-dev-10-1 : Depends: libcublas-dev (>= 10.2.0.168) but it is not going to be installed
cuda-samples-10-1 : Depends: libcublas-dev (>= 10.2.0.168) but it is not going to be installed
cuda-visual-tools-10-1 : Depends: libcublas-dev (>= 10.2.0.168) but it is not going to be installed
vim : Depends: vim-runtime (= 2:8.0.1453-1ubuntu1.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Frankly I made a mess of installing CUDA, so I'm wondering if these messages mean that I've broken anything. If not, why can't vim install?
Here is the output of sudo apt--fix-broken install
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:
g++-6 libaccinj64-9.1 libcublas9.1 libcudart9.1 libcufft9.1 libcufftw9.1 libcuinj64-9.1 libcurand9.1
libcusolver9.1 libcusparse9.1 libnppc9.1 libnppial9.1 libnppicc9.1 libnppicom9.1 libnppidei9.1
libnppif9.1 libnppig9.1 libnppim9.1 libnppist9.1 libnppisu9.1 libnppitc9.1 libnpps9.1 libnvblas9.1
libnvgraph9.1 libnvrtc9.1 libnvtoolsext1 libnvvm3 libstdc++-6-dev libthrust-dev libvdpau-dev
nvidia-cuda-dev nvidia-cuda-doc nvidia-cuda-gdb nvidia-opencl-dev nvidia-profiler
nvidia-visual-profiler ocl-icd-opencl-dev opencl-c-headers openjdk-8-jre
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 53 not upgraded.
35 not fully installed or removed.
Need to get 0 B/39.1 MB of archives.
After this operation, 112 MB of additional disk space will be used.
sudo apt --fix-broken install
orsudo apt -f install
? Be careful if you do run that command to make sure you review the changes that are to be made before you type "Y" to accept the changes. – mchid Jul 21 '19 at 23:55vim
problem doesn't look related to CUDA. I have checked and I see that the specific CUDA packages mentioned are not available through the typical repositories and so I would go ahead and open another question related to the CUDA problem and please run the command:sudo apt --fix-broken install
but do not accept the changes. Do press CTRL+C to exit out (and not accept the changes) and then please copy and paste this output into your new question so that we can see what the suggested solution from the command is. Thanks! I have an answer for you below. Please post any errors. – mchid Jul 22 '19 at 06:06dpkg
error or something? – mchid Jul 24 '19 at 00:02sudo apt clean; sudo apt update
first. Without knowing exactly what is going on, I'm afraid to offer a solution that might break your install. Broken package management is not usually the end of the world but it does sometimes take trying these solutions in different combinations to fix things. Usually, however, in a situation like this, you just have to either run:sudo dpkg --configure -a
and/or install each of the packages that are mentioned:sudo apt install libcublas-dev
before you can move forward. – mchid Jul 24 '19 at 03:17sudo dpkg --configure -a
which I believe will help you in this situation and I believe you may need to do this first because the output states that there are packages that have not fully been installed or removed. This can happen for a number of reasons but the fix for packages that have not fully been installed or removed is typicallysudo dpkg --configure -a
Then, run:sudo apt clean; sudo apt update
and then run:sudo apt install libcublas-dev
. – mchid Jul 24 '19 at 03:28