5

I tried installing VIM using terminal command sudo apt-get install vim but it didn't install and I got this message:

You might want to run 'apt-get -f install' to correct these:

The following packages have unmet dependencies:  flashplugin-installer   : Breaks: flashplugin-downloader (< 11.1.102.55ubuntu3) but  
11.0.1.152ubuntu1 is to be installed
vim : Depends: vim-common (= 2:7.3.429-2ubuntu2.1) but 2:7.3.429-2ubuntu2 is to be installed  
      Depends: vim-runtime (= 2:7.3.429-2ubuntu2.1) but it is not going to be installed

E: Unmet dependencies. Try 'apt-get -f install'  with no packages (or specify a solution

I tried using apt-get -f to install, but it didn't work.

How can I fix it?

Zanna
  • 70,465

4 Answers4

17

probably answering this too late. but try uninstalling vim-common too. I was facing a similar problem with the error message

The following packages have unmet dependencies:
 vim : Depends: vim-common (= 2:7.3.429-2ubuntu2) but 2:7.3.429-2ubuntu2.1 is to be installed
E: Unable to correct problems, you have held broken packages.

I was able to solve it by uninstalling vim-common package first.

sudo apt-get remove vim-common

After that i was able to install it with no problems.

roopunk
  • 271
  • 1
  • 4
8

What I see there is that the flashplugin-installer package had some kind of downloading or installing problem and it is not letting you install vim. What I suggest is remove the flashplugin package, then do a refresh of the repository cache and then download vim. Afterwards just install flash again, although I recommend doing it via the restricted extras. Something like the following:

sudo apt-get remove flashplugin-installer
sudo apt-get update
sudo apt-get install vim
sudo apt-get install ubuntu-restricted-extras

On another note I actually still recommend using aptitude over apt-get. Or even synaptic to solve in an easy manner multiple conflicting problems between packages.

Zanna
  • 70,465
Luis Alvarado
  • 211,503
4

I would like to combine both of ur answers. Type it one by one:

sudo apt-get install ubuntu-restricted-extras
sudo apt-get update
sudo apt-get remove vim-common
sudo apt-get install vim
Eric Carvalho
  • 54,385
Akash
  • 41
0

I realize this was posted more than 4 years ago.

So here in June 2017 I installed lubuntu 12.04

I had all these same problems.

I tried everything listed in all the answers I could find but could not get vim nor vim-nox to install.

So you can just imagine my surprise when I typed in

vi

and it came up with the vim screen in color.

I am embarrassed I spent an hour trying to force the install only to discover that it is already there.

That explains why the vim-common had a version problem.

SDsolar
  • 3,169