I am trying to install the latest version of vim on Ubuntu 12.10. But when I use this command
sudo apt-get install vim
It gives me such an error
How to solve this?
I am assuming vim works, and you would like a newer version. Therefore, my answer deliberately bypasses the method you are trying to use -- sudo apt-get -- which is fine for most things.
However, the fact you have a message "already at the latest level" is telling me you want a newer version.
I suggest you create a scratch directory under ~ after you log in.
1) mkdir vim_install
2) Then download the latest *nix version of vim -- The runtime and source files together: vim-##.tar.bz2 vim-7.3.tar.bz2 -- and unpack it in vim_install. A directory vim73 should be created.
3) Follow the instructions in vim73/README.txt. Almost immediately, you'll be told to read another README that corresponds to your architecture/OS.
4) At some point you'll build and/or distribute as root.
I've done this on several Linux systems we have in production, and downloading vim has never caused a problem for anything else I have installed, because it is built from its sources to run compatibly with your Linux system.
Have you tried running sudo apt-get install vim-common
before sudo apt-get install vim
? It looks like it's just missing that dependency; once that's installed I imagine it should work alright.
Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:
sudo apt-get -f install
Once that command finishes, then do
sudo apt-get install vim
If the above doesn't work, try
sudo apt-get clean
Then
sudo apt-get update && sudo apt-get upgrade
and try installing VIM again.
Try installing GUI VIM
sudo apt-get install vim-gnome
You can try this :
sudo dpkg --configure -a
and then
sudo apt-get install -f
Then, you may need to retry to install vim
sudo apt-get install vim