How to install VIM on Linux when I don't have root permissions?

make install DESTDIR=~/.local, then make a symlink in ~/bin to ~/.local/bin/vim.


I often install things with ./configure --prefix=$HOME/.local && make && make install where I'm not root. That's the way to proceed.

This works with most software. Vim is in no way different here.

Note that in vim case, I actually configure with the following options (as well) --disable-perlinterp --enable-rubyinterp --enable-multibyte --enable-pythoninterp --with-features=huge as I like my version of Vim to be quite complete.


  1. Create local user path:

    mkdir -p ~/usr/local
    
  2. Downloaded latest version of ncurses from here: http://ftp.gnu.org/pub/gnu/ncurses/

  3. Install ncurses:

    cd <path_to_ncurses_downloaded_folder>
    tar -xzvf <ncurses>.tar.gz
    cd <ncurses_extracted_folder>
    ./configure --prefix=$HOME/usr/local
    make
    make install
    
  4. Clone vim-repo with

    git clone https://github.com/vim/vim.git
    
  5. Install vim with:

    cd vim/src
    LDFLAGS=-L$HOME/usr/local/lib ./configure --prefix=$HOME/usr/local
    make
    make install
    
  6. Set PATH with

    export PATH=$PATH:$HOME/usr/local/bin