I had vim working for a while and uninstalled it for no good reason. To reinstall it I gave the following commands:

sudo apt-get update

I get warnings that the respository deadsnakes/ppa and pycharm/ubuntu are not secure, but nothing that seems relevant (I guess)

sudo apt-get upgrade vim-runtime
sudo apt-get upgrade vim-common
sudo -i apt-get install vim

vim : Depends: vim-common (= 2:8.1.0320-1ubuntu3.1) but 2:8.1.0875-5ubuntu2 is to be installed
      Depends: vim-runtime (= 2:8.1.0320-1ubuntu3.1) but 2:8.1.0875-5ubuntu2 is to be installed

I then tried

apt-get install -f

This appears to have done nothing since it says 0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.

So I am pretty much stumped.

After getting vim working again, I would like to enable the system clipboard. I read that this is accomplished by installing vim-gnome. When I tried to do that, I encountered similar issues.

  • 1
    Welcome to Vi and Vim! I've edited your question to make better use of our markdown syntax. On an unrelated note, I wonder if Unix & Linux might not be able to help more? It seems like an ubuntu version issue. – D. Ben Knoble Dec 21 '19 at 2:47
  • 2
    You might also want to consider Ask Ubuntu, you'll find a lot more experts on Ubuntu package management there... – filbranden Dec 21 '19 at 4:08

I fixed it with

sudo aptitude install vim

When aptitude told me about the dependencies and offered to fix them, I had tried saying yes, but that did not help. However, saying n caused aptitude to offer to downgrade the packages to their correct versions. When I said Y to that, it successfully installed vim.

Then it was easy to install vim-gnome with the command

sudo aptitude install vim-gnome

This, combined with the settings

Plugin 'repeat.vim'
Plugin 'vim-easyclip.vim'

in my vimrc allowed the paste operations to use the system clipboard, which was the ultimate goal. At least this last step is specific to vim and may be helpful to others.

A happy ending if the downgrading of the vim common and runtime does not have side effects!

  • 3
    You may learn to use Markdown to make your post more readable. – jdhao Dec 21 '19 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.