9.17.2010

Installing vim and gvim 7.3 on ubuntu 10.03 Lucid Lynx from source

Recently I tried to install gvim 7.3 on my Ubuntu box. While the distro has vim / gvim in its repositories, it is not the latest version. I downloaded the source file and built and compiled on my system.
Installing Vim was fairly straightforward, but I had trouble figuring out how to install gvim. I had to hunt for specific directions for gvim. I thought it would be beneficial to have instructions for both on the same page. So here it is!


GVim, while included in vim, requires additional libraries for the GUI, and certain flags must be enabled when you run 'configure'.


So here's what I did:

Download source to Vim, and unzip it. It should create a folder called 'vim73/'
____________________________________________
$cd vim73
$./configure
$make
$sudo make install
$sudo make install clean
____________________________________________


Now Vim 7.3 should be installed on your system. While running the above, you may get an error for missing dependency for ncurses-dev. You can run 'apt-get install' to get that and run the command again.


Gvim is still not installed, so you will have to do the following steps:
______________________________________________________________

$sudo apt-get install libncurses-dev libgnome2-dev \
 libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev \
 libx11-dev libxpm-dev libxt-dev
$cd vim73/src/
$make distclean
$./configure --with-features=huge --enable-gui=gnome2
$make
$sudo make install
______________________________________________________________

After this, you should have a working vim7.3 and gvim7.3 on your box.


There is more information at the following links: 
http://vim.wikia.com/wiki/Building_Viand of course at http://www.vim.org


Good luck and happy Vi'ing


-Sean


*These instructions are for Ubuntu, however I suspect they will work for other distros and versions as well.
**Generally the downside of installing from source, instead of your distro's package manager is that you are responsible for maintaining all utilities you installed from source. I find this to be a good thing. However, if you want the packages to be updated and patched, update-manager will not do it.


2 comments:

tropicflite said...

Thanks for the write-up. This method worked for me. The only thing is
after I installed gvim I couldn't locate the icon to make a launcher in
gnome, so I found one here:

https://www.blogger.com/comment.g?blogID=6328418617020153072&postID=899233857877333969

and I use the larger of the 2 png files.

Bitchslap said...

Outstanding, this should be on the Vim.org site for installation instructions, at least for Ubuntu 10.10. Worked like a charm, thanks a ton!