Install VIM general instruction: sudo apt-get install vim is done.
But there is: reading the list of packages ... Completing the dependency tree that is analyzing the package is reading status information ... Complete the currently unavailable package vim, but it is referenced by other packages. This may mean that the missing package may have been discarded, or it can only be found in other publishing sources E: Package vim has no candidate to install
This problem should be a problem with the software source, the version in the source is relatively low, and the dependent version number is lower than the version number that is being installed, which makes it impossible to install.
Just remove the original software source and replace it with a new one. Method: Add source to your software source: sudo vim/etc/apt/sources.list add: Deb Http://cz.archive.ubuntu.com/ubuntu/lucid main
Write the software source, and then refresh, pay attention to be sure to refresh, run:
sudo apt-get update
Then install VIM or Gvim
sudo apt-get install vim
Reading Package List ... Complete
Analyzing Dependency tree for Package
Reading status information ... Complete
There are some software packages that cannot be installed. If you are using a unstable release, this may be
Because the system is not up to the state you requested. There may be some of the software you need in this release
Packages have not been created or they have been removed from the new to (incoming) directory.
The following information may help resolve the problem: The following packages have unsatisfied dependencies:
Vim: dependent: vim-common (= 2:7.3.429-2ubuntu2.1) But 2:7.3.547-4UBUNTU1 is going to be installed
E: Errors cannot be fixed because you require that some packages remain in the current situation, that is, they destroy dependencies between packages
The reason may be installed Vim depends on the Vim-common and the system Vim-common version of the conflict, the solution is to uninstall the Vim-common first and then install Vim.
sudo apt-get remove Vim-common
sudo apt-get install vim