Easily Installing Vim 7.2 From Source

Vim 7.2 beta was released last month, and 7.2 is now stable. First check to see if your distro offers a package, and if not, follow these simple instructions on how to install it from source, from the vim7.2 subversion branch.

cd /tmp/
svn co https://vim.svn.sourceforge.net/svnroot/vim/branches/vim7.2
cd vim7.2/
./configure --with-features=huge --enable-gui=gnome2 --enable-cscope --enable-pythoninterp
make

Now you can use sudo make install and you’re done,…but

I suggest using checkinstall (sudo apt-get install checkinstall) to keep track of the installed files, create a package, and have the option of easily removing whatever you installed easily (i.e., dpkg -r vim7.2).

sudo checkinstall -D

If the above command doesn’t work, you aren’t alone. It recently began giving me these errors:

cp vim /usr/local/bin/vim
chmod 755 /usr/local/bin/vim: setting permissions for `/usr/local/bin/vim': No such file or directory
make[1]: Leaving directory
… etc …
**** Installation failed. Aborting package creation.

I dug up some info about the problem, along with a solution:

There seems to be a bug in the filesystem translation code which has been
biting people using newer versions of glibc found in most recent linux
distributions. It is being worked on. If you find weird install errors
when running checkinstall but your software installs fine without
checkinstall then you can work around the bug by disabling the fs
translation code and forcing checkinstall to install the package. Use the
–fstrans=no and –install=yes command line options:

checkinstall <options> –fstrans=no –install=yes <install_command>

Source: http://oclug.on.ca/archives/oclug/2004-May/038916.html

From the man page:

–install Toggle installation of the created package.
–fstrans Enable/disable filesystem translation. Filesystem translation
enabled causes the install to proceed in a  temporary  directory, thus not actually touching your system.

sudo checkinstall --fstrans=no --install=yes

You can also have checkinstall create a package by passing in one of these flags:

–type  Choose packaging system. Can be one of ’slackware’,  ’debian’ or ’rpm’.
-D        Create a Debian package.
-R        Create a RPM package.
-S        Create a Slackware Package.

For example, to create a Debian package, I would do this:

sudo checkinstall --fstrans=no --install=yes -D:

Done. The new package has been installed and saved to
/home/mr.Gvim/vim7.2/vim7.2_20080824_amd64.deb

To see the changes from 7.1, use :help version-7.2

4 thoughts on “Easily Installing Vim 7.2 From Source”

  1. hi..i’m new to this linux thing and i got ubuntu on my laptop..my VI sucks as it doesnt have syntax highlighting and all that good stuff..i’ve downloaded VIm7.2 but i have no idea what you guyz mean by source and all that computer language stuff..i just wanna install vim7.2 and begin programming lessons..pliz help..email me at thomaskatwe@yahoo.com

    1. Hey Thomas. This should no longer be an issue. Just install vim using Ubuntu’s package manager instead of trying to compile it from source. You will need to edit the vi/vim config to enable syntax highlighting and other features. I suggest starting out with a simpler editor if you just want to begin programming asap. vim itself has a high learning curve. Other editors you can try include Eclipse, Gedit, or Cream, which is a version of vim that is easier to get into.

  2. The configuration can not be complete and I get the following message:

    no terminal library found
    checking for tgetent()… configure: error: NOT FOUND!
    You need to install a terminal library; for example ncurses.
    Or specify the name of the library with –with-tlib.

    I’d be grateful to know how I can fix this problem.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>