Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

just installed LAMP server and need to use vim editor to edit php.ini

the cli command 'sudo apt-get install vim' gives me the following error:

<Package 'vim' is not available but is refered to by another package. This means the package is missing or is obsolete, or is only avaiable from another source.
E: Package 'vim' has no installation candidate>

Please advise

share|improve this question
What version of Ubuntu are you using? – Warren Hill Jun 9 '13 at 16:36
Possible duplicate Cannot install vim – Warren Hill Jun 9 '13 at 17:09

You should update your source list.Use another editor, fix the source list.


add the neweset source.It need root permission.And then

sudo apt-get update

Maybe you can go to

down the tar and then make & make install on your computer.Vim a userful ide.

share|improve this answer

Vim is a powerful editor and should install with the command you gave in 12.04, 12.10 or 13.04.

However you do not need vim. There are other command line text editors available and I would suggest you use nano instead. It is installed by default and while its not as powerful as vim it is much easier to learn.

If you have the desktop version of Ubuntu you can also use GUI based editors such as gedit.

share|improve this answer
I am using nono editor instead. thanks – user165849 Jun 9 '13 at 16:42

You don't necessarily need to use vim. The text editor nano would have come in Ubuntu by default. Using it from the CLI is the same as vim:

nano /etc/path/to/php.ini

If you need vim itself, the vim-nox package should include vim:

sudo apt-get install vim-nox

The GUI version of Vim should also include command-line version of vim. You can install it as follows:

sudo apt-get install vim-gtk

Hope that helps.

share|improve this answer
thanks. the install of any of the vim packages does not occur :( – user165849 Jun 9 '13 at 16:41
Could you show us the terminal output when you try to run the command? Also, which command is it? – Scott Jun 9 '13 at 16:42
The version of vim installed from vim-gtk has access to the xclipboard, while the version in vim-nox does not. – evilsoup Aug 20 '13 at 9:45

If vim is not in the source.list of your system you can use usually vi too.

Check here for the difference: What is the difference between Vi and Vim?

And you have always the option to compile it yourself, eg.

share|improve this answer

Your Answer


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.