Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
Are you sure your universe repository is enabled? –  Wolter Hellmund Sep 29 '13 at 19:58
add comment

3 Answers

try this

sudo apt-get update
sudo apt-get install vim-common
share|improve this answer
    
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
add comment

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

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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