1

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.
  • How did you install CUDA? Did you use a PPA or did you download it from the internet (instead of using apt-get) or something? Also, have you tried running sudo apt --fix-broken install or sudo 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:55
  • @mchid I downloaded off the internet. I didn't try that command because I'm afraid of breaking CUDA for the 100th time – JobHunter69 Jul 22 '19 at 00:17
  • @mchid this is a CUDA problem correct? – JobHunter69 Jul 22 '19 at 00:17
  • No, the vim 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:06
  • Also, please post a comment to let me know if you have posted a new question. When you break CUDA, do you get an "dpkg: error processing" some package error? If so, then please take a look at this possibly related question: https://askubuntu.com/questions/940582/upgrade-or-uninstall-cuda-to-allow-apt-get-to-work – mchid Jul 22 '19 at 06:18
  • 1
    @mchid thank you very much for the help. I'll be sure to keep you updated – JobHunter69 Jul 22 '19 at 06:24
  • @mchid sorry for the late response. Here is what I'm getting (in question details). So I am also apparently having trouble installing git: – JobHunter69 Jul 23 '19 at 19:28
  • Okay thanks! Can you please explain how CUDA normally breaks? Do you normally get a dpkg error or something? – mchid Jul 24 '19 at 00:02
  • @mchid Well it doesn't break right now (at least for my purposes using Tensorflow and chainer). Rather, I've installed it and reinstalled a large number of times, it's in a very delicate position. – JobHunter69 Jul 24 '19 at 00:19
  • You may need to run sudo 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:17
  • Here is an answer that explains this process: https://askubuntu.com/a/230958/167115 Some of the other answers also mention running: sudo 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 typically sudo 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
  • Please let me know if this solves the issue. If this does solve the issue then we can mark this as a duplicate. Thanks! – mchid Jul 24 '19 at 03:31

1 Answers1

1

Vim should be able to install without the CUDA packages so run the following command to install vim:

sudo apt update
sudo apt install vim-common vim-runtime vim

Please post any errors. Thanks!

Update:

Because you have:

35 not fully installed or removed.

The fix for this problem is usually:

sudo dpkg --configure -a

Also, it doesn't look like it will break anything by going through with the installation of the dependency because the dependency is the only mentioned change to be made.

The fix for the unmet dependency is usually to install the unmet dependency and then run your updates and upgrades:

sudo apt clean
sudo apt update
sudo apt install libcublas-dev

If the system complains about another dependency, just install that dependency using the same method first, and then install libcublas-dev.

mchid
  • 43,546
  • 8
  • 97
  • 150