I can't install vim on my terminal

13,572

Solution 1

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

Solution 2

try this

sudo apt-get update
sudo apt-get install vim-common

Solution 3

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:
13,572
jan
Author by

jan

Updated on September 18, 2022

Comments

  • jan
    jan over 1 year

    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

    • Severo Raz
      Severo Raz over 10 years
      Are you sure your universe repository is enabled?
  • jan
    jan over 11 years
    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>