Installing YouCompleteMe for vim in Ubuntu MATE 14.04

Posted on Fri 13 April 2018 in misc • 1 min read

Pre-requisites

  • Gvim 7.4: (sudo apt-get install vim-gnome).
  • Build Essentials: sudo apt-get install build-essential cmake python-dev.
  • Curl: sudo apt-get install curl.
  • Pathogen: curl -Sso ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim.
  • Clang: sudo apt-get install clang-3.5 (Or whatever version is current when you read this).

The Method

Ubuntu (and some others) don't install clang so that there's a libclang.so file present in the required place. After some Google-Fu, (https://github.com/Valloric/YouCompleteMe/issues/28) I eventually figured out that I had to symlink the file.

$ sudo ln -s /usr/lib/llvm-3.5/lib/libclang.so.1 /usr/lib/llvm-3.5/lib/libclang.so

Once the symlink has been made, you can compile YCM:

$ ~/.vim/bundle/YouCompleteMe/.install.sh --clang-completer --system-libclang

FIN