Sven [email protected] ©1995-2001

Last update: Wed Jun 13 20:30:26 MEST 2001

VIM - Installation Help

Installing a program can be a difficult thing. We all need help with this sometime.

This described how I install Vim from source on a Solaris machine. I usually install Vim without GUI and in my home directory.

Feedback is very welcome!

Sven Guckes [email protected]


Download

The first thing you usually do is download the archives. Note that there are two archives - the source archive and the runtime archive. There are quite some hints in the Download FAQ.

On my home machine I can use wget to download the archives:

guckes@home:~> sudo zsh
Password:
# cd /usr/local/src
# wget ftp://ftp.vim.org/pub/vim/unreleased/unix/vim-6.0ao-rt.tar.bz2
# wget ftp://ftp.vim.org/pub/vim/unreleased/unix/vim-6.0ao-src.tar.bz2

Unpacking the archives

After the download you have to uncompress/unpack the archives. The method depends on which archives you have downloaded.

BZip2 archives

Uncompress the files from the archive with "bzip -d" and then unpack the archive with "tar x":

$ bzip2 -d -c vim-6.0ao-rt.tar.bz2  | tar xvv
$ bzip2 -d -c vim-6.0ao-src.tar.bz2 | tar xvv

BZip2 archive

Since Vim-6.0am [010701] there are archive files which contain *both* the source and the runtime files; these are packed with bzip2. Unpacking these with tar requires the option I:

$ ls *ao*bz2
... 2709416 Jul 22 19:36 vim-6.0ao.tar.bz2
$ tar xvvIf vim-6.0ao-src.tar.gz

GNU Zip archives

In case you downloaded the "*.gz" archives you need to use GNU's "tar" to "untar" the files:

$ tar xvvzf vim-6.0ao-rt.tar.gz
$ tar xvvzf vim-6.0ao-src.tar.gz
Note: If "tar" complains that it does not understand the option 'z' then it might not be the GNU "tar"; however, the GNU "tar" might exist on your system as "gtar" - check with "which gtar".

The option 'z' tells "tar" that the archive was packed with "zip". Therefore, "tar" will implicitly unpack the archive using "unzip".

The option "vv" simply makes the command "very verbosely" - this makes "tar" shows the filenames with timestamps. If you don't care to see what is happening during the unpacking then just leave those options out; just use "xfz" then.


Non-root Installation -> --prefix=$HOME

If you cannot be root on your system then I suggest to place the downloaded archives (the runtime archive and the source archive) in the directory $HOME/archive/:

$ ls $HOME/archive/vim*gz
... 1347778 Jun 10 19:38 vim-6.0ao-rt.tar.bz2
... 1255345 Jun 10 19:42 vim-6.0ao-src.tar.bz2
Now, if you want to install vim for yourself in your own home directory then you should tell the configure script about this by specifying the installation path prefix:

$ cd $HOME/install/
$ ./configure --prefix=$HOME
$ make
$ make install
The vim binary should now have been placed in your $HOME/bin directory.


Comments

The hardest part of the installation probably is the configuration of options in the "Makefile". The comments are quite good - but scrolling around and editing the file takes some time and can be tricky.

Many users are not allowed to install the binary under the default directory "/usr/local/", so I advise you to change at least the "prefix" in the Makefile:

### Installation directories.  The defaults come from configure.
### prefix    the top directory for the data (default "/usr/local")
# Uncomment the next line to install Vim in your home directory.
prefix = $(HOME)/solaris

Q: How to configure Vim *without* GUI again?
A: Check the output of the configure help for "gui":

# ./configure --help | grep -i gui
  --enable-gui[=OPTS]     X11 GUI [default=auto] [OPTS=auto/no/gtk/gnome/motif/athena/beos/photon]
  --enable-gtk-check      If auto-select GUI, check for GTK [default=yes]
  --enable-gnome-check    If GTK GUI, check for GNOME [default=yes]
  --enable-motif-check    If auto-select GUI, check for Motif [default=yes]
  --enable-athena-check   If auto-select GUI, check for Athena [default=yes]
Aha - there it is: --enable-gui=no.

# ./configure --enable-gui=no

Compiled by NAME

Maintainers who wish to give a contact address to their users should add this info to the binary using the configure option --with-compiledby=NAME, for example:

./configure --with-compiledby="Sven Guckes [email protected]"
And I am asking every binary *maintainer* to do so! This should give some more mail.. hehe :-)


Checking the installed binary

After the "make install" I usually call vim to show me the "version info":
VIM - Vi IMproved 6.0aj ALPHA (2001 Jun 10, compiled Jun 13 2001 19:12:37)
Compiled by guckes@ritz
Normal version without GUI.  Features included (+) or not (-):
+autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent
+cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv -cscope
+dialog_con +diff +digraphs -ebcdic -emacs_tags +eval +ex_extra +extra_search
-farsi +file_in_path -osfiletype +find_in_path +folding -footer +fork()
-gettext -hangul_input +insert_expand +jumplist -keymap -langmap +libcall
+linebreak +lispindent +listcmds +localmap -keymap +menu +mksession
+modify_fname +mouse -mouseshape -mouse_dec -mouse_gpm -mouse_jsbterm
-mouse_netterm +mouse_xterm -multi_byte +multi_lang +path_extra -perl +printer
-python +quickfix -rightleft -ruby +scrollbind -signs +smartindent -sniff
+statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white
-tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands
+vertsplit +virtualedit +visual +visualextra +viminfo +wildignore +wildmenu
+windows +writebackup +X11 -xfontset -xim +xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/home/robinson/emailer/guckes/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -I/usr/local/include  -g -O2 -I/usr/openwin/include
Linking: gcc  -L/usr/openwin/lib -R/usr/openwin/lib  -L/usr/local/lib -o vim    -lXt -lX11 -lncurses -ldl

Vim Installation Example - Solaris + HomeDir -GUI

Change to installation directory:
cd ~/install
The ftp server here is mounted on /import/ftp/ so I can unpack the archives like this:

tar xvvzf /import/ftp/misc/editors/vim/unreleased/unix/vim-6.0aj-rt.tar.gz
tar xvvzf /import/ftp/misc/editors/vim/unreleased/unix/vim-6.0aj-src.tar.gz
tar xvvIf /import/ftp/misc/editors/vim/unreleased/unix/vim-6.0ao-src.tar.gz

Configuration:

./configure  --prefix=$HOME  --enable-gui=no \
--with-compiledby="Sven Guckes [email protected]"
Note that the file "config.cache" is created as opposed to loaded. When installing Vim for another system then this cache file has to be deleted first. (This error has cost me some time..)

The automatic configuration should end with

	updating cache ./config.cache
	creating ./config.status
	creating config.mk
	creating config.h
Stripping the binary, naming the binary with version number, and making "vim" a link on "vim-version":

$ cd ~/bin
$ strip vim
$ mv vim vim-6.0ao
$ ln -s  vim-6.0ao vim
$ which vim
$ ls -l `which vim`

Back to the -> VIM Pages

URL:         http://www.math.fu-berlin.de/~guckes/vim/howto/install.html
             https://www.vim8.org/install.html
Created:     Mon Feb 12 00:00:00 MET 1996
Send feedback on this page to
Sven Guckes [email protected]