I've got some troubles when I try to install Vim on Linux while I don't have a root account. The error information is shown below:


How can I solve this? Can I install it in another directory other than /usr/local/bin/vim?


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

| improve this answer | |
  • Do I need to create a fold named .local or it's just a normal name? – SpawnST Jul 12 '10 at 9:24
  • 1
    It is safest to create the destination directory yourself. – Ignacio Vazquez-Abrams Jul 12 '10 at 9:31
  • 1
    I got a vim diretory like /home/apache/.local/usr/local/share/vim/vim72 after finish the two steps.Anything wrong? – SpawnST Jul 12 '10 at 9:36
  • 4
    it would be greatly appreciated if you can write all steps down in the answer. – SpawnST Jul 12 '10 at 9:44
  • 4
    ./configure --prefix=~/.local && make install – akira Jul 12 '10 at 10:33

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.

| improve this answer | |
  • After this step, I add my ~/local/bin to the PATH: export PATH="/home/youruser/.local/bin:$PATH" – Renato Prado Apr 3 at 14:28
  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 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 install
  6. Set PATH with

    export PATH=$PATH:$HOME/usr/local/bin
| improve this answer | |

step 1: make install DESTDIR=~/.local (make your local dir if it is not present)

step 2: export PATH=$PATH:/remote/users/yourusername/.local/bin

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.