5

whenever i try to execute vim, the terminal shows this: The program 'vim' can be found in the following packages:

* vim
 * vim-gnome
 * vim-tiny
 * vim-athena
 * vim-gtk
 * vim-nox
Try: sudo apt-get install <selected package>

So I tried what most of my classmates had done, sudo apt-get update and sudo apt-get install vim but it didn't work. The terminal shows this message after I entered sudo apt-get install vim

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'vim' has no installation candidate

Thanks for the answers

1
  • 1
    Are you sure your universe repository is enabled? – Severo Raz Sep 29 '13 at 19:58
2

Try to do sudo apt-get update && sudo apt-get upgrade before installing vim. Sometimes not-upgraded packages mess up installation of others.

1

try this

sudo apt-get update
sudo apt-get install vim-common
1
  • Reading package lists... Done Building dependency tree Reading state information... Done vim-common is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded. PC:~$ vim hello.c The program 'vim' can be found in the following packages: * vim * vim-gnome * vim-tiny * vim-athena * vim-gtk * vim-nox Try: sudo apt-get install <selected package> – jan Nov 23 '12 at 13:10
1

The message tells you that the vim command is available in differently compiled binary package versions. Try sudo apt-get install vim-gnome.

askubuntu.com - Difference between vim-gtk and vim-gnome

https://help.ubuntu.com/community/VimHowto

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.